This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-22
Channels
- # announcements (17)
- # beginners (11)
- # biff (5)
- # calva (22)
- # cider (30)
- # clj-kondo (33)
- # clj-on-windows (20)
- # clojure (59)
- # clojure-dev (25)
- # clojure-europe (31)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-sweden (5)
- # clojure-uk (6)
- # clojurescript (5)
- # community-development (2)
- # cursive (4)
- # datahike (5)
- # datalevin (7)
- # datomic (11)
- # emacs (8)
- # events (1)
- # gratitude (1)
- # hoplon (5)
- # hyperfiddle (1)
- # lsp (59)
- # matrix (11)
- # polylith (14)
- # portal (3)
- # practicalli (1)
- # rdf (2)
- # reitit (9)
- # releases (3)
- # rum (5)
- # yamlscript (6)
https://github.com/clj-kondo/clj-kondo: static analyzer and linter for Clojure code that sparks joy ✨
2024.05.22
• https://github.com/clj-kondo/clj-kondo/issues/2323: New linter :redundant-str-call
which detects unnecessary str
calls. Off by default.
• https://github.com/clj-kondo/clj-kondo/issues/2302: New linter: :equals-expected-position
to enforce expected value to be in first (or last) position. See https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md
• https://github.com/clj-kondo/clj-kondo/issues/1035: Support SARIF output with --config {:output {:format :sarif}}
• https://github.com/clj-kondo/clj-kondo/issues/2307: import configs to intermediate dir
• https://github.com/clj-kondo/clj-kondo/issues/2309: Report unused for
expression
• https://github.com/clj-kondo/clj-kondo/issues/2315: Fix regression with unused JavaScript namespace
• https://github.com/clj-kondo/clj-kondo/issues/2304: Report unused value in defn
body
• https://github.com/clj-kondo/clj-kondo/issues/2227: Allow :flds
to be used in keys destructuring for ClojureDart
• https://github.com/clj-kondo/clj-kondo/issues/2316: Handle ignore hint on protocol method
• https://github.com/clj-kondo/clj-kondo/issues/2322: Add location to warning about invalid unicode character
• https://github.com/clj-kondo/clj-kondo/issues/2319: Support :discouraged-var
on global JS values, like js/fetch
I'm not sure why but this release seemed to break some of my macro hooks https://github.com/typedclojure/typedclojure/actions/runs/9199303978/job/25303812581
https://github.com/clj-kondo/clj-kondo/commit/871465008aeff018e15885ab57151171335c30f7
@U055XFK8V hmmm, I'll take a look
@U055XFK8V how can I run this locally?
The bash function run-tests
refers to a script ./script/test
but I can't find it in the repo. Unfortunately it takes me a lot of time to go through this bash stuff to find out what's going on
One possible issue could be that you have linted/analyzed/imported configs with clj-kondo current and then lint with an older kondo, which doesn't work anymore since the imported configs are now in .clj-kondo/imports
$ rg "clj-kondo/clj-kondo"
example-projects/clj-kondo-hooks/deps.edn
5: {:replace-deps {clj-kondo/clj-kondo {:mvn/version "2024.03.13"}}
@U04V15CAJ here's the minimal reproduction afaict https://github.com/frenchy64/clj-kondo-2024-05-22-reprod
@U055XFK8V I think I pointed to the cause in the message before yours
when I check out your repro, and mkdir -p .clj-kondo
and then run script/lint
it works
This is in deps.edn:
{:deps {org.clojure/clojure {:mvn/version "1.11.1"}
org.typedclojure/typed.clj.runtime {:mvn/version "1.2.1"}}
:aliases {:clj-kondo
{:replace-deps {clj-kondo/clj-kondo {:mvn/version "2024.05.22"}}
:main-opts ["-m" "clj-kondo.main"]}}}
which is the new versionoh I see, bash is screwing us:
borkdude@m1-3 /tmp/clj-kondo-2024-05-22-reprod (main) $ script/lint
+ rm -r .clj-kondo
rm: .clj-kondo: No such file or directory
borkdude@m1-3 /tmp/clj-kondo-2024-05-22-reprod (main) $ mkdir .clj-kondo
borkdude@m1-3 /tmp/clj-kondo-2024-05-22-reprod (main) $ script/lint
+ rm -r .clj-kondo
+ mkdir -p .clj-kondo
+ clojure -M:clj-kondo --version
clj-kondo v2024.05.22
++ clojure -Spath
Downloading: org/typedclojure/typed.clj.runtime/1.2.1/typed.clj.runtime-1.2.1.pom from clojars
Downloading: org/typedclojure/pom.typed/1.2.1/pom.typed-1.2.1.pom from clojars
Downloading: org/typedclojure/typed.clj.runtime/1.2.1/typed.clj.runtime-1.2.1.jar from clojars
+ clojure -M:clj-kondo --lint src:/Users/borkdude/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.jar:/Users/borkdude/.m2/repository/org/typedclojure/typed.clj.runtime/1.2.1/typed.clj.runtime-1.2.1.jar:/Users/borkdude/.m2/repository/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar:/Users/borkdude/.m2/repository/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar --copy-configs --skip-lint
Configs copied:
- .clj-kondo/imports/org.typedclojure/typed.clj.runtime
linting took 52ms, errors: 0, warnings: 0
+ tree .clj-kondo
script/lint: line 9: tree: command not found
yeah now I see:
+ clojure -M:clj-kondo --lint src --config '{:output {:format :text :summary false}}'
src/typed_example/clj_kondo_hooks.clj:4:11: error: Unresolved symbol: a
src/typed_example/clj_kondo_hooks.clj:4:21: error: Expected: number, received: string.
src/typed_example/clj_kondo_hooks.clj:5:3: error: Unexpected usage of recur.
@U055XFK8V new release is out
@U04V15CAJ fixes the issue!