Fork me on GitHub
Felipe de Morais12:01:17

Is there a config to make clj-kondo fix the issues instead of just raise it? 👀


@felipejpa15 clj-kondo only outputs warnings or information that other tools can use to automatically fix the issues. clj-kondo itself will not rewrite your code

thanks 3

If you are looking for refactoring tools, maybe try clojure-lsp or clj-refactor


Any preferences?

$ clojure -M:clj-kondo --lang clj --lint - <<< "(clojure.core/x)"
<stdin>:1:2: warning: No such var: clojure.core/x
This uses the same message as the clojure compiler would output, but the linter is called :unresolved-var. So the message could also be:
Unresolved var: clojure.core/x


Hmm, I think Unresolved var is better for consistency and also, clj-kondo might have a false positive in which case "No such var" would not be true, but "Unresolved var" would be ;)

👍 3

Clj-kondo v2021.01.20 New: unresolved var linter and various other improvements! See for details. Release notes:

🎉 21

wOOt WooT!!