Suppose I want to write a custom linter that uses an existing tool. Would pods be a valid way to interact with the external tool?
Hum, I believe @andreribeirocamargo did something similar, but I think you can just spawn a shell from Clojure normally
Does that work from within the sci sandbox that clojure-lsp linters run in?
I believe so, even being sci/interpreted it should be able to spawn shell process, @borkdude can confirm that
no limitations if you provide SCI with the right namespaces / functions
Found it: https://github.com/clojure-lsp/clojure-lsp/pull/2075 You could do the same
cool. i guess this requires maintaining a local fork of clojure-lsp. is this what most people do?
No, we can go and merge that PR, I was waiting @andreribeirocamargo finish and mark as ready
You can just copy the config for babashka.process from babashka itself if you want
wow. ok. i wasn't sure if there were security implications
or other libs too
that's a good point. in clj-kondo I try to maintain that hooks should not be able to do everything
The custom linters are opted-in for users, so it's not an automatic thing, so I'm ok with that
I could be locked/down customized with a policy config if needed.
Yeah, in the end the custom linters happens in your side as well, you code it, so you can control how you want
That PR is old and has conflicts, feel free to open a new one with those changes if you want
I sort of prefer babashka.process. Do you have a preference vs clojure.java.shell?
maybe both?
(here's the config for process: https://github.com/babashka/babashka/blob/master/src/babashka/impl/process.clj)
I prefer bb as well, since this runs in sci and we have it in Clojure-lsp, I'm ok adding bb process