clj-kondo

https://github.com/clj-kondo/clj-kondo
eskos 2020-10-08T07:44:00.120400Z

What would be the best way to tell clj-kondo to purge/refresh a project specific cache? I’m doing multi-library development for an internal project and our kondo caches seem to get out of sync quite easily for some reason when switching branches, probably at least partially due to how quickly our snapshot releases change.

borkdude 2020-10-08T07:44:40.120700Z

@suomi.esko You can rm -rf .clj-kondo/.cache

eskos 2020-10-08T07:45:58.121400Z

I don’t think I’m ready to live in the danger zone of putting rm -rf into git hook 😅

borkdude 2020-10-08T07:46:54.121900Z

@suomi.esko mv .clj-kondo/.cache .clj-kondo/.cache-old? ;)

🐽 1
eskos 2020-10-08T07:47:49.122800Z

That’s better 🙂 But cool, throwing the entire thing out probably works the best in this case anyway 👍

borkdude 2020-10-08T09:20:55.123300Z

Merged to master: https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#shadowed-var Binaries can be obtained by navigating from Github to the CircleCI builds

mbjarland 2020-10-08T14:21:34.124600Z

is there any way to bind clj-kondo to F2 in intellij/cursive so that you can iterate through the issues found by cursive and the issues found by clj-kondo?

borkdude 2020-10-08T14:22:33.125600Z

@mbjarland I think this depends on the plugin you're using for clj-kondo linting in IntelliJ. you might be able to find it in their docs

mbjarland 2020-10-08T14:22:50.126Z

file watchers, but ok

borkdude 2020-10-08T14:23:02.126300Z

Some people use FileWatcher, ah yes ok. So maybe there's something in the menu for FW

mbjarland 2020-10-08T14:33:33.128Z

ok for posterity, in intellij you can go to Settings > Editor > Inspections and find File Watcher Problems and change the file watcher problem severity from "Weak Warning" to "Warning" and then the clj-kondo warnings will be included in the normal list of warnings reported (usually cycled through with F2 and visible in the top right file status widget)

🚀 1
mbjarland 2020-10-08T14:35:24.128900Z

The weak warnings are reported as well, but not cycle-able via F2

Karol Wójcik 2020-10-08T15:14:14.131Z

Is there a hook which may support following macro?

(rfori [[index item] [1 2 3 4 5])]
   (println index item))

borkdude 2020-10-08T15:18:48.131900Z

I think you could just use {:lint-as {your.macro/rfori clojure.core/for}} for this, as clj-kondo doesn't care about your implementation as long as the syntax matches

❤️ 1
Karol Wójcik 2020-10-08T15:21:17.132200Z

Works perfectly!

Karol Wójcik 2020-10-08T15:21:23.132400Z

Thank you @borkdude