clj-kondo

https://github.com/clj-kondo/clj-kondo
borkdude 2020-10-10T09:54:52.135500Z

Clj-kondo v2020.10.10 New: shadowed var linter and various improvements and fixes Release notes: https://github.com/borkdude/clj-kondo/blob/master/CHANGELOG.md#v20201010 This release is funded by Clojurists Together.

5
Luis Santos 2020-10-10T11:40:59.140500Z

Hi Maybe this is an existing feature but I cannot find information about it. Would it be possible to annotate a macro, using metadata, with lint-as rule so that I can have out-of-box linting support? And if not is there a technical limitation or would it be a bad practice to do this? Thanks for all great work.

borkdude 2020-10-10T11:45:26.141800Z

@luis559 Hi. This is not supported, since that would rely on clj-kondo linting the source of your macro in the right order, or at all and clj-kondo is not designed in such a way: it's designed to deal with incomplete information. A better way is to PR your config here: https://github.com/clj-kondo/config and then install the config using that lib.

borkdude 2020-10-10T11:46:35.142500Z

I'm still considering something like picking up config from the classpath, but it's not yet clear

borkdude 2020-10-10T11:46:56.142800Z

I think the config library could also be made to handle that

borkdude 2020-10-10T11:47:32.143400Z

So then users could provide a clj-kondo.config/your.org/your.lib/config.edn directory on the classpath

borkdude 2020-10-10T11:47:39.143600Z

and this will then be copied, or something like that

borkdude 2020-10-10T11:49:34.145Z

The issue for that is this one: https://github.com/clj-kondo/config/issues/1

Luis Santos 2020-10-10T11:51:36.146400Z

The classpath option sounds promising as well. Thanks for explanation. Looking forward to see how it evolves. Thanks.