clj-kondo

https://github.com/clj-kondo/clj-kondo
Felipe de Morais 2021-01-20T12:58:17.113100Z

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

borkdude 2021-01-20T13:04:58.113700Z

@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

1
borkdude 2021-01-20T13:05:46.114100Z

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

borkdude 2021-01-20T15:12:47.115100Z

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

borkdude 2021-01-20T15:26:24.115800Z

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 ;)

👍 1
borkdude 2021-01-20T19:17:26.118600Z

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

🎉 7
2021-01-21T21:38:20.020600Z

wOOt WooT!!

borkdude 2021-01-20T19:20:08.118900Z