-
-
Notifications
You must be signed in to change notification settings - Fork 70
clj-kondo hooks #135
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
clj-kondo hooks #135
Conversation
@sogaiu - is this ready to merge? |
Was thinking it might be good to have at least one report of success for at least one other person, but haven't heard of any tests yet. I think @jjtolton said he might have some time in December. WDYT? |
If you are happy I am happy. I don't use Kondo and I definitely understand wanting another user to check it out. |
Tested, works great. Approved! Thanks for the guidance, @sogaiu |
It's like watching an (White Snake/A Chinese Ghost Story). |
@jjtolton Thanks for taking a look and testing! My current feeling is that perhaps the current code can give folks a taste of what can be done to customize clj-kondo's behavior for use with libpython-clj. I'm fine to consider / work on some other bits once it's clear there are specific requests -- though may be in many cases it will be easy enough for other folks to contribute too :) How does that sound? |
I think it's great. We'll get some docs together on how to use it! |
Sorry if this is off-topic, hope it will be tolerated :) @PlumpMath I don't understand the reference -- would you mind giving some hints? |
@sogaiu |
This PR is an attempt at providing support for clj-kondo hooks in libpython-clj. For details on the specific hooks please see: clj-python/clj-template#9
The idea here is to bundle the hooks with libpython-clj itself so that users can obtain the relevant hook code from the library (whether it's via a
.jar
or a git dep) itself and not have to go looking elsewhere nor figure out which version of the hook code is appropriate.Note that getting the hook code into place and activated in one's project is a process that involves user intervention -- it is not just a matter of obtaining libpython-clj or updating a libpython-clj dependency.
The process subsequent to updating libpython-clj is basically:
.clj-kondo
directory in the project's top-level directory.clj-kondo
directory.clj-kondo/config.edn
appropriatelyThe following comment contains a log of this process for libpython-clj: clj-kondo/config#1 (comment) [1]
Documentation for this feature can be found at: https://github.com/borkdude/clj-kondo/blob/master/doc/config.md#Exporting-and-importing-configuration
Note that versions of clj-kondo earlier than v2020.11.07 are not likely to work.
[1] Slight gotcha with the instructions -- initially I used "clj_python" as a directory name, but was told this could be "clj-python". This change has been reflected in this PR.