-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added clj-condo configs #27
Conversation
b5b136d
to
edd1627
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
.clj-kondo/config.edn
Outdated
@@ -0,0 +1 @@ | |||
{:config-paths ["adambard/failjure"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pratik97 This should be ../resources/clj-kondo.exports/adambard/failjure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-kondo
linter, as I was gettingunresolved-symbol
in my IDE while using failjure.