Fork me on GitHub
#clj-kondo
<
2022-07-13
>
practicalli-johnny15:07:40

What arguments do I need to use with clj-kondo to lint a project deps.edn , resources/config.edn , clojure .clj files under src and test directory trees, but not the file .cljstyle in the root directory of the project. I’ve looked at include exclude, but getting only a sub-set of the files linted Do I need to run separate clj-kondo --lint files for each? So 4 different clj-kondo commands?

borkdude15:07:08

@U05254DQM You can probably just do clj-kondo --lint . right? Files that don't end with .clj etc are skipped

borkdude15:07:37

You can also do:

clj-kondo --lint deps.edn resources/config.edn src test

practicalli-johnny15:07:18

ah, so I can just chain the paths with --lint, that sounds good…

practicalli-johnny15:07:44

Is there an option to list what files are being checked

borkdude15:07:08

not really no, but you could also make an explicit list and then use xargs I guess

practicalli-johnny15:07:31

Yes, the command line works, thanks. I was getting tripped up with a GitHub action that sets a *.clj* pattern for clj-kondo by default. Hopefully I can over-ride this in the GitHub action and simulate the command line correctly

practicalli-johnny17:07:00

In the end I’ve switched to the clojure-setup GitHub action and used the following command to avoid linting the clojure files under dev directory

clj-kondo --lint deps.edn resources/config.edn src test --config .clj-kondo/config-ci.edn
Works very nicely, thank you.

👍 1