clj-kondo

https://github.com/clj-kondo/clj-kondo
tanzoniteblack 2020-07-30T19:55:10.252200Z

echo '(require '\''clojure.tools.logging)(clojure.tools.logging/logf "cat" 1)' | clj-kondo --lint -
pretty cool that we now get errors for formatting. How would I go about making clj-kondo recognize the matching functions from timbre ( https://github.com/ptaoussanis/timbre )
echo '(require '\''taoensso.timbre)(taoensso.timbre/logf "cat" 1)' | clj-kondo --lint -                                                                                                                                                                          130 ↵
linting took 6ms, errors: 0, warnings: 0

borkdude 2020-07-30T19:56:03.253100Z

@tanzoniteblack if timbre uses the exact same syntax as clojure.tools.logging or clojure.core/format, you can use :lint-as

Grant Isom 2020-07-30T20:26:41.255Z

@borkdude Is there a way to use use multiple config files in the vscode extension? My cli command is clj-kondo --lint src --config .clj-kondo/project_config.edn and am trying to add the proj specific linters to what is used in VSCode.

borkdude 2020-07-30T20:39:07.255500Z

Currently not. Why don't you rename .clj-kondo/project_config.edn to .clj-kondo/config.edn? Then it will work

Grant Isom 2020-07-30T20:40:51.256300Z

We have a global linter file we share between a bunch of projects, then have config files that are merged with specific things per project.

borkdude 2020-07-30T20:42:07.257600Z

@grant.isom Right. I think it's best to write a script that uses clj-kondo.core/merge-configs to spit out the merged config in your .clj-kondo/config.edn. You can write this script using clojure but also with babashka (since clj-kondo can be invoked as a babashka pod).

borkdude 2020-07-30T20:42:28.257800Z

See https://github.com/borkdude/clj-kondo/#babashka-pod for an example.

Grant Isom 2020-07-30T20:42:46.258200Z

Awesome, will take a look. Thanks!

tanzoniteblack 2020-07-30T21:01:38.258300Z

thanks!