This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-16
Channels
- # ai (5)
- # announcements (47)
- # aws (11)
- # babashka (20)
- # beginners (85)
- # biff (1)
- # calva (72)
- # cider (9)
- # clj-kondo (37)
- # cljfx (9)
- # cljs-dev (1)
- # clojars (2)
- # clojure (61)
- # clojure-berlin (2)
- # clojure-europe (189)
- # clojure-nl (1)
- # clojure-norway (17)
- # clojure-uk (2)
- # clojurescript (51)
- # conjure (3)
- # cursive (4)
- # data-science (6)
- # datomic (6)
- # events (5)
- # fulcro (16)
- # gratitude (9)
- # holy-lambda (9)
- # introduce-yourself (6)
- # lsp (13)
- # malli (8)
- # membrane (2)
- # off-topic (47)
- # pedestal (11)
- # re-frame (15)
- # reitit (1)
- # releases (2)
- # rewrite-clj (6)
- # rum (4)
- # shadow-cljs (2)
- # tools-deps (3)
- # xtdb (25)
- # yada (13)
A bikeshed for y'all: What would be a good name for a linter that checks if a var (referenced via symbol) already has an alias?
(require '[clojure.string :as str[)
clojure.string/join ;; Namespace clojure.string has alias: str
The PR is ready but the name is something that might need improvement.
We started with :existing-alias
but I wanted var or symbol in the name since we will have a similar linter for keywords. So now we have :aliased-namespace-symbol
(indicating that the namespace of the symbol has an alias)
I think we could do better though. This is where you come in!:namespace-has-alias
? IMO it’s less about keywords / vars and more about the fact that you’ve specified a fully-qualified namespace when you’ve already aliased it before
:use-ns-alias-on-symbol
recommends the action that should be taken…
but maybe you wan’t to describe the problem?
:not-using-ns-alias-on-symbol
Or maybe you a hint?
:ns-alias-available
i like that last one
Yours is good too @U02EA2T7FEH!
i like when the the linters have "positive" names, action or rule. i don't like when the name has "no" or "don't" or "not" in the same, cuz it makes it harder to know how to configure it to make it work correctly
:unused-ns-symbol-alias
I'm not sure I see the value in using a different linter message for keyword and symbol aliases.
i initially thought we didn't need to separate symbols and keywords, but i feel like giving folks more control of granularity is good
Those work. I guess a different message for both would at least simplify things for implementing the cycle action for https://github.com/clojure-lsp/clojure-lsp/issues/1128 and its symbol counterpart.
alias
there reads more like a verb to me than a hyphenated adjective
/me inhales deeply in bliss; nothing like some quality bike shedding to end the week
heh I guess I'll suggest a variation on my original choice:`existing-namespace-alias` . I feel it's short and punchy: "there exists an alias for the namespace referenced here"
Oh that’s not a bad point. Could just talk about the namespace and not the keyword or symbol.
:namespace-is-aliased
if that doesn’t conflict with other linter names.
you could not talk about symbol or keyword, but we want two different linters for those, so you should talk about them :)
Ok, then maybe something more personalized:
:for-the-love-of-pete-there-is-an-alias-for-this-namespace-just-use-it-already-lee
lol, I didn't realize we already have :aliased-namespace-symbol
https://clojurians.slack.com/archives/CHY97NXE2/p1663361698943839?thread_ts=1663349616.937209&cid=CHY97NXE2
I guess we'll just keep it like this then :) /cc @UEENNMX0T
The bikeshed continues! I'd say the warning for this linter should be on the symbol, not on the "call" (the surrounding list): Right?
Ah heck, putting it on the call itself is obviously the right move, idk why I didn’t do it. Thanks for catching and fixing it.
I'm using timbre
for logging along with the json appender library, and the json appender library requires that the log inputs are formatted a specific way. I wrote a hook (`taoensso.timbre/log`) for timbre's logging functions that works on all of them. Is this part avoidable or am I stuck listing all of them manually?
{:hooks {:analyze-call {
taoensso.timbre/debug taoensso.timbre/log
taoensso.timbre/error taoensso.timbre/log
taoensso.timbre/fatal taoensso.timbre/log
taoensso.timbre/info taoensso.timbre/log
taoensso.timbre/report taoensso.timbre/log
taoensso.timbre/trace taoensso.timbre/log
taoensso.timbre/warn taoensso.timbre/log
}