clj-kondo

https://github.com/clj-kondo/clj-kondo
piyer 2021-05-05T00:04:18.412300Z

If I am planning on using clj-kondo with flycheck do I still need LSP setup?

ericdallo 2021-05-05T00:14:04.412400Z

If you just want lint on your code, you don't need LSP. But if you want lint + refactoring + quick fixes + other IDE features, you'd probably wants to install only lsp-mode and clojure-lsp which already have clj-jondo built-in and give all of that

ericdallo 2021-05-05T00:14:36.412600Z

Here you can see all features: https://clojure-lsp.github.io/clojure-lsp/features/

piyer 2021-05-05T00:27:33.412900Z

@ericdallo Thank you!

matheusashton 2021-05-05T02:11:55.414600Z

Hello, I'm having an issue with clj-kondo and honeysql because honeysql helpers are macros and clj-kondo doesn't recognize those macros. I tried configuring clj-kondo as in honeysql's https://github.com/seancorfield/honeysql/blob/develop/.clj-kondo/config.edn but now, instead of a unknown symbol warning, I'm getting an error because it expects (select :field1 :field2 :field3) to have only 2 arguments.. anyone had issues like this before?

matheusashton 2021-05-05T02:18:55.414800Z

solve it adding a config to lint the helper as clj-kondo.lint-as/def-catch-all

Aron 2021-05-05T09:55:51.415800Z

helo, I am trying to use clj-kondo and it tells me Unexpected error. Please report an issue. when I try to lint a file manually

borkdude 2021-05-05T09:56:45.416200Z

can you give more information? please be as detailed as you can.

Aron 2021-05-05T09:56:52.416400Z

I am not sure if I can.

Aron 2021-05-05T09:57:24.416600Z

https://imgur.com/a/ZEmqHnG

Aron 2021-05-05T09:57:56.416900Z

not sure if this helps at all

borkdude 2021-05-05T09:58:16.417500Z

well, for example, you could make a screenshot of how you invoke clj-kondo, provide the clj-kondo version, operating system, etc.

Aron 2021-05-05T09:58:27.417800Z

I can try to localize the issue after work in non-work file

borkdude 2021-05-05T09:58:42.418100Z

this sounds like a configuration error possibly.

borkdude 2021-05-05T09:58:58.418800Z

can you rename the config.edn file to config.bak.edn or something?

Aron 2021-05-05T09:59:16.419300Z

definitely, I will re check the configuration, will take a while. thanks

Aron 2021-05-05T10:02:28.419900Z

renaming does make the error go away, thanks again.

borkdude 2021-05-05T10:03:23.420500Z

this probably means that there is misconfiguration in this file. please let me know what caused it so clj-kondo can provide a better error message

Aron 2021-05-05T10:12:33.421200Z

:unresolved symbol :exclude vector had lists without further vectors, just the namespaces

Aron 2021-05-05T10:12:57.421700Z

although, by mistake I left a () in it, that caused a nullpointer exception 🙂

Aron 2021-05-05T10:13:10.422100Z

thanks for the help, now I am trying to write a working config...

Aron 2021-05-05T10:15:01.422500Z

:unresolved-symbol {:exclude [(helix.core/defnc) (helix.core/defhook) (kitchen-async.promise)]}}}

Aron 2021-05-05T10:16:05.423700Z

and :exclude [ () .... btw. I wouldn't expect anything to work with incorrect config, so I am sharing it mostly to clear it up, not because I think you should do anything about it

borkdude 2021-05-05T10:17:37.424100Z

I think clj-kondo can provide a linter for its own config. We are already linting deps.edn as well

Aron 2021-05-05T10:20:09.424400Z

turtles all the way down? 🙂

🐢 1