Uh oh!
There was an error while loading. Please reload this page.
clj-kondo hooks - #135
Conversation
cnuernber
commented
Nov 23, 2020
@sogaiu - is this ready to merge? |
sogaiu
commented
Nov 23, 2020
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? |
cnuernber
commented
Nov 24, 2020
If you are happy I am happy. I don't use Kondo and I definitely understand wanting another user to check it out. |
jjtolton
commented
Dec 9, 2020
Tested, works great. Approved! Thanks for the guidance, @sogaiu |
PlumpMath
commented
Dec 9, 2020
It's like watching an (White Snake/A Chinese Ghost Story). |
sogaiu
commented
Dec 9, 2020
@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? |
jjtolton
commented
Dec 9, 2020
I think it's great. We'll get some docs together on how to use it! |
sogaiu
commented
Dec 10, 2020
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
.jaror 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-kondodirectory in the project's top-level directory.clj-kondodirectory.clj-kondo/config.ednappropriatelyThe 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.