This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-16
Channels
- # announcements (2)
- # babashka (51)
- # beginners (165)
- # biff (39)
- # clara (1)
- # clj-kondo (20)
- # cljsrn (6)
- # clojure (64)
- # clojure-belgium (11)
- # clojure-conj (2)
- # clojure-europe (12)
- # clojure-nl (3)
- # clojure-norway (7)
- # clojure-uk (6)
- # clojurescript (11)
- # conf-proposals (1)
- # conjure (1)
- # core-async (19)
- # cursive (6)
- # data-science (16)
- # datomic (6)
- # deps-new (4)
- # fulcro (60)
- # funcool (3)
- # graalvm (9)
- # helix (14)
- # introduce-yourself (4)
- # jobs-discuss (13)
- # joyride (1)
- # kaocha (2)
- # malli (12)
- # off-topic (25)
- # polylith (9)
- # portal (3)
- # practicalli (1)
- # rdf (43)
- # re-frame (7)
- # reagent (5)
- # releases (5)
- # remote-jobs (8)
- # sci (5)
- # shadow-cljs (42)
- # squint (6)
- # xtdb (5)
the new :aliased-namespace-var-usage
is complaining when the as-alias is just used to refer to namespaced keywords in my project. I thought :as-alias
was designed for that sort of usage?
@U053YSSSJ Hmm, can you give a repro?
Hmm, I see:
$ clj-kondo --lint - <<< '(ns foo (:require [bar :as-alias b])) ::b/dude'
<stdin>::: warning: Namespace only aliased but wasn't loaded: bar
linting took 35ms, errors: 0, warnings: 1
Yeah, that's no good. I'll fix it right awaythanks, a nice demo of how to quickly reproduce too 🙂
@UKFSJSM38 Please bump clj-kondo with this fix in clojure-lsp
Is there currently any way to configure :missing-docstring
to ignore vars with :no-doc
/`:skip-wiki`/etc?
No, but I think that would be a great addition. Could you post an issue? (+ optionally a PR, don't feel pressured)
https://github.com/clj-kondo/clj-kondo: static analyzer and linter for Clojure code that sparks joy ✨
2023.01.16
• https://github.com/clj-kondo/clj-kondo/issues/1920: new linter :def-fn
: warn when using fn
inside def
, or fn
inside let
inside def
(https://github.com/andreyorst).
• https://github.com/clj-kondo/clj-kondo/issues/1949: :aliased-namespace-var-usage
gives erroneous output for keywords
• Add test for https://github.com/clj-kondo/clj-kondo/issues/1944 (already worked)
• Don't reload SCI namespace on every hook usage
@UKFSJSM38 plz upgrade in clojure-lsp - especially the hook reloading should matter for performance if many hooks are used
I recommend upgrading to 2023.01.16 if you're using many hooks since accidentally the SCI namespaces were always reloaded on every hook usage. Due to this: https://github.com/clj-kondo/clj-kondo/issues/1954
Seems that kondo do not support the deprecation of a one specific arity. Anyone else interested in it?
echo '(defn foo ^:deprecated (^:deprecated []) ([x] x)) (foo)' | clj-kondo --lint -
I don’t think that’s a thing for Clojure either:
user=> (defn foo ^:deprecated (^:deprecated []) ([x] x))
#'user/foo
user=> (meta #'foo)
{:arglists ([] [x]),
:line 140,
:column 1,
:file "NO_SOURCE_PATH",
:name foo,
:ns #object[clojure.lang.Namespace "0x7a3eafcd" "user"]}
note if you put the ^:deprecated
on the var
user=> (defn ^:deprecated foo (^:deprecated []) ([x] x))
#'user/foo
user=> (meta #'foo)
{:deprecated true,
:arglists ([] [x]),
:line 142,
:column 1,
:file "NO_SOURCE_PATH",
:name foo,
:ns #object[clojure.lang.Namespace "0x7a3eafcd" "user"]}