marcomorain / clojure-lint

GNU General Public License v3.0
18 stars 2 forks source link

Feature request: specify path to clj-kondo #9

Open filipesilva opened 4 years ago

filipesilva commented 4 years ago

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.

marcomorain commented 4 years ago

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.

filipesilva commented 4 years ago

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.

borkdude commented 4 years ago

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?).

filipesilva commented 4 years ago

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.