Fork me on GitHub

Is clj-kondo supposed to work in combination with Joker, or should I remove Joker entirely?


I am living a joker free life now and havent missed it. One less binary to install and update. I sometimes run Kibit before I do a commit, but that rarely suggests anything now I use clj-kondo - or maybe I am just getting better at idiomatic Clojure 🙂


@orestis you can use them both. see the docs of flycheck-clj-kondo


they both have the same output format so in theory you could even write a script that concats the output 🙂


I guess I'm just wondering if clj-kondo is a superset of Joker -- would I see two warnings about an unused variable then?


yes, sometimes you would see two warnings. to solve that I've made a wrapper script which greps out certain warnings


This is my joker wrapper script:

#!/usr/bin/env bash

## turn off some joker features, so I can test clj-kondo better

/usr/local/bin/joker "[email protected]" 2>&1 \
    | grep -v "unused parameter" \
    | grep -v "unused binding" \
    | grep -v "unused namespace" \
    | grep -v "unsupported binding form" \
    | grep -iv "unable to resolve symbol" \
    | grep -v "duplicate require" \
    | sed -e 's/$/ (joker)/'
exit 0

đź‘Ť 4

I've placed that in some directory on the path which has priority over /usr/local/bin


Also anotther Q since I have you here -- can a library vendor supply clj-kondo linting rules? So if a library has a macro that should be linted as defn, is that what :clj-kondo/config in the namespace metadata refers to?


Putting config in .clj-kondo/config.edn is the preferred location


oh sorry, misread


no, a library can not supply clj-kondo config. that's a nice feature to have for sure


for now it's best if the library makes a section in the README about this probably


OK. I remember from somewhere that you would also accept PRs for commonly used macros, is that so?


or maybe there should be a central location in the clj-kondo repo that lists all kinds of macros and config that people can opt in to


@orestis sure, after some agreement on "commonly used" 🙂


Hehe that's the crux I guess. But would be nice if a library author could provide some metadata directly in the defmacro that clj-kondo could pick up.


technically that's a bit challenging, since the rule has to be known at the time of use and the order in which these things are linted is not predictable


it's probably more robust if the macro author makes a clj-kondo PR with config for his/her macro


if it's just config, I'd be happy to support it. if there is custom analyzing needed beyond the config, then we have to make the trade-off if this is worth the time and energy


maybe it makes sense to have a third-party.edn config file that people can optionally turn on and where macro authors can supply their PR


FWIW, here's an issue: -- but I can't make a compelling argument whether the library is "commonly used", so feel free to just ignore. Thanks for creating this!

Eric Ihli19:10:07

What's a good way to jump-to-definition without Cider?




Guesses pretty accurately

Eric Ihli19:10:28

Looks like that will work. Thanks!


No prob :)


lsp mode can provider this as well


@ericihli fwiw, it's still a bit early, but i've written something that produces a TAGS file that tries to cover one's project as well as its dependencies. using this TAGS file, one can do jump to definition with emacs' built-in xref-find-defiintions (M-.). it uses cl-kondo in the hopes of doing a decent job of static analysis.

Eric Ihli07:10:20

Is it published anywhere?


yes, hope to post more when i'm not struggling with mobile input :)