clojure-lint icon indicating copy to clipboard operation
clojure-lint copied to clipboard

Feature request: specify path to clj-kondo

Open filipesilva opened this issue 6 years ago • 4 comments

Would it be possible to specify the path to clj-kondo instead of needing to have it globally available?

The use case I'd like to enable is to have a local clj-kondo install and point the extension to use that one.

filipesilva avatar Oct 18 '19 12:10 filipesilva

I’d happily accept a PR to add this. I think a setting in the extension would do it. A string bag specifies the specific path to the clj-kondo executable. If this is not set, then we would search the path.

An additional, related feature would be to allow the extension to download its own copy of the executable and vendor it somewhere.

marcomorain avatar Oct 18 '19 13:10 marcomorain

I coordinated with @borkdude about this, and now there's a npm distro of clj-kondo: https://www.npmjs.com/package/clj-kondo

There are no Windows binaries still, but it will download Linux and OSX ones.

filipesilva avatar Oct 19 '19 09:10 filipesilva

Thoughts from Slack:

Maybe in Windows if you make a clj-kondo.bat file which just pass the args to java clj-kondo-standalone.jar it already kind of works?

This would not be suited for linting on every keystroke, but on demand it might work (and it's better than having nothing at all?).

borkdude avatar Oct 19 '19 16:10 borkdude

https://www.npmjs.com/package/clj-kondo now works on windows too by falling back to using java -jar <release.jar> on platforms that don't have a binary.

filipesilva avatar Oct 21 '19 10:10 filipesilva