Added clj-condo configs#27
Conversation
b5b136d to
edd1627
Compare
| @@ -0,0 +1 @@ | |||
| {:config-paths ["adambard/failjure"]} No newline at end of file | |||
There was a problem hiding this comment.
@pratik97 This should be ../resources/clj-kondo.exports/adambard/failjure
There was a problem hiding this comment.
@borkdude I think @ericdallo mentioned on Slack that resources folder is already on the classpath(lein adds that), and we don't need to mention the relative path here. It's similar as one of Eric's PR.
There was a problem hiding this comment.
The above only works if you invoke clj-kondo with --copy-configs so it will copy resources/clj-kondo.exports/adambard/failjure to .clj-kondo/adambard/failjure which feels a bit unnecessary since the files are already locally available and makes it more difficult to develop the config. Having only one source of truth is better. :config-paths doesn't work with a classpath: it just looks up a directory relative to the config.edn file. So ../resources/clj-kondo.exports/adambard/failjure is what is recommended to use here.
See fulcro's config for comparison:
https://github.com/fulcrologic/fulcro/blob/develop/.clj-kondo/config.edn
edd1627 to
1ade903
Compare
|
Looks good to me. @adambard Here are some other libraries which include the config similar to this PR, in case you're wondering. |
|
+1 here |
|
Apologies for the long delay, and thanks very much for this! |
|
Does failjure's config file for clj-kondo actually make it into the published It doesn't seem to for me, i.e. even when using the latest version of failjure (2.3.0) via @TuggyNE, I notice you have a PR #35 refining the config slightly, so I take it that at a basic level things are working for you? Do you use failjure via |
|
@frou I use Leiningen + Calva for most of my deps. I'm not totally sure whether Leiningen or Calva (or Calva's configuration of clj-kondo or clojure-lsp) is responsible for populating the config files. But it does seem to be using this exact file as merged in this PR and presumably there's no other source for it. (Failjure is not one of the short list of libraries included either in clj-kondo directly or in https://github.com/clj-kondo/configs.) |
You can check this with: So it seems so. But you have to do this to copy the exported configs to the You'll get a message about which configs were imported. Btw @TuggyNE, the failjure jar file also seems to contain AOT-ed Clojure namespaces: I'm not sure if that is intentional or not. |
|
See also https://github.com/clj-kondo/clj-kondo/tree/master?tab=readme-ov-file#project-setup towards the end. |
|
Thank you folks. To inspect the I've got things working by following the instructions https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#importing and additionally adding |
@adambard added configs for
clj-kondolinter, as I was gettingunresolved-symbolin my IDE while using failjure.