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
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 ;)
Clj-kondo v2021.01.20 ✨ New: unresolved var linter and various other improvements! See https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#unresolved-var for details. Release notes: https://github.com/borkdude/clj-kondo/blob/master/CHANGELOG.md#v20210120
wOOt WooT!!