-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add clj-kondo hooks #56
Conversation
LMK if any questions @ptaoussanis :) |
8beb57c
to
5fc3019
Compare
7bec5eb
to
1da01a9
Compare
d6af559
to
d6236b6
Compare
ecae192
to
ead76df
Compare
abf7e8e
to
efe0346
Compare
b983a1c
to
4a4855c
Compare
3992229
to
865a6ef
Compare
717ab7a
to
4718d57
Compare
@ericdallo Hi Eric, apologies for the long delay getting back to you on this! Just double checking if the PR is still up-to-date / relevant? Thanks! |
No problem @ptaoussanis! |
Merging now, thanks Eric! |
@ericdallo
|
@jumarko Hi Juraj, while waiting for a reply from Eric - I'd like to ask in the meantime:
What do you mean by "loading" here? Can you be more specific about exactly what command you're running? What build tool are you using? Thanks! |
This works following clj-kondo exports feature, basically the encore lib how has under resources folder the clj-kondo hooks configuration, when clj-kondo is lining a project that has encore as the lib dependency, clj-kondo will scan the encore jar and find this clj-kondo config as it's available on the classpath, all what the user needs to do is include this on it's project:
{:config-paths ["taoensso/encore"]} |
@ptaoussanis I'm trying to use datalevin that requires encore.
trying to load the above ns definition fails:
It works using encore version I was wondering why it couldn't find the var and thus the namespace. That's the reason why I thought it's related to this change. |
Just to confirm: this error should also mention what the exact var is couldn't be resolved. It's Are you manually including Truss in your own project? If so, please make sure that you're either on the latest version - or just let Encore bring in an appropriate version automatically. Some info to help you debug here. |
Upgrading to truss 1.8.0 indeed fixed the problem. |
No problem Juraj, thanks for the confirmation. And thanks @ericdallo! |
This should make clj-kondo understand the
defalias
custom macro and correctly lint it as an alias, this PR also add the hook config to resources classpath following export feature, this make clj-kondo understand this macro on any lib that uses encore for exampletaoensso.timbre/spit-appender
, the user only needs to add to its clj-kondo config a{:config-paths ["taoensso/encore"]}
.Some examples of other libs that did the same: midje, state-flow