This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-13
Channels
- # announcements (1)
- # babashka (12)
- # beginners (10)
- # biff (9)
- # calva (2)
- # cherry (21)
- # cider (14)
- # clj-commons (76)
- # clj-kondo (8)
- # clj-on-windows (34)
- # cljs-dev (5)
- # clojure (48)
- # clojure-austin (7)
- # clojure-europe (97)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (22)
- # clojurescript (137)
- # conjure (33)
- # cursive (4)
- # datalevin (1)
- # deps-new (4)
- # devcards (2)
- # duct (3)
- # events (1)
- # fulcro (12)
- # graphql (9)
- # hyperfiddle (16)
- # jobs (8)
- # kaocha (1)
- # leiningen (6)
- # lsp (39)
- # malli (38)
- # membrane (20)
- # nbb (68)
- # observability (7)
- # off-topic (49)
- # pathom (11)
- # polylith (8)
- # portal (22)
- # re-frame (6)
- # releases (1)
- # remote-jobs (2)
- # shadow-cljs (24)
- # spacemacs (2)
- # squint (6)
- # xtdb (7)
Lint idea: there's :unresolved-namespace
(https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#unresolved-namespace), but it doesn't raise any flags when a fully qualified symbol's namespace is required and aliased or the symbol is referred. I'd love a linter that says "if an alias exists, warn on not using the alias. if the symbol is referred, warn on using the full namespace". Something like :qualified-symbols
? To allow for fully configuring it with different styles: :fully-qualified
would mean you have to write clojure.string/join
, :prefer-alias
would mean you have to write str/join
if [clojure.string :as str :refer [join]]
, :prefer-refer
would mean you have to write join
if [clojure.string :as str :refer [join]]
, :any
would mean either str/join
or join
is fine if [clojure.string :as str :refer [join]]
.
hmm idk about the styles lol, probably just have an order of preference: referred -> alias -> fully qualified.
oops! thank you
There is a clojure convention to use s
, n
, coll
, m
, and others to refer to the type of a function argument. Has there ever been any thought to transforming those kind of arguments into :type-mismatch
linting rules? I am asking if it exists before I start building such a thing to see if it’s worthwhile.