Fork me on GitHub
#clj-kondo
<
2024-06-25
>
joost-diepenmaat11:06:39

Is there anything like the eastwood linter for keyword misspellings in kondo? That basically checks for “single-use keywords” with the assumption that those are likely typos. https://github.com/jonase/eastwood?tab=readme-ov-file#keyword-typos

👍 1
borkdude11:06:13

not directly, but you can use the clj-kondo analysis https://github.com/clj-kondo/clj-kondo/blob/master/analysis/README.md to check for the frequency of keywords in your codebase

joost-diepenmaat11:06:49

hmm. if I try that: clj-kondo --lint src --config '{:analysis true}' linting took 373ms, errors: 0, warnings: 0 I get no other output clj-kondo --lint src --config '{:analysis true :output :edn}' Outputs nothing at all (not even linting time)

borkdude11:06:16

you need to enable the keyword analysis

borkdude11:06:31

and also it's :output {:format :edn}

joost-diepenmaat11:06:15

Ah yes setting output format worked:

clj-kondo  --lint src --config '{:analysis {:keywords true} :output {:format :edn}}'

borkdude11:06:06

perhaps this could be a linter for clojure-lsp if it hasn't already such a thing. (cc @UKFSJSM38)