I think that issue now mostly looks good. One thing I'm grappling with is how can we have :config-paths
in a way that it will work for all users on a project, be it on Windows, mac, Linux, CI.
I was thinking we could have some env var interpolation and conditional logic:
["%HOME%/.clj-kondo" [:when %CI% "/home/deploy/kondo-configs"]]
:-s, but probaaably notSilently ignoring non-existing paths probably also works. Not sure about Windows paths combined with Linux paths
Maybe Windows users should write: "/C/Users/borkdude/.clj-kondo"
Neh, I guess they are fine with just writing "C:\\Users"
since this works both on linux and Windows: (.exists (io/file "C:\\Users")) ;;=> false
Probably in a team, relative paths are quite common: just put all the shared configs in a dir one or two up
Tidbit that may be helpful or not: I think I am remembering correctly, that within the JVM, forward slashes also work on Windows.
Let me verify that. What I did test is that classpath entries / resources are valid with forward slashes only
It's so convenient that I can just ssh into my new Windows computer and do:
borkdude@DESKTOP-JN2UNTV ~ $ /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe lein repl
to spin up a Windows Clojure REPL ;)Yep, it works:
user=> (.exists (io/file "C:/Users"))
true
thanks
Oddly though, I think classpath separators are not automatically translated.
I'll just not use those
I guess this is a little bit iffy when on macOS/linux:
user=> (.isAbsolute (io/file "C:/Users"))
false
user=> (.isAbsolute (io/file "C:\\Users"))
false
So here is the idea in a screenshot:
@robert-stuttaford @martinklepsch Would also appreciate your feedback since you use the Rum hook code (potentially in multiple projects) - the issue: https://github.com/borkdude/clj-kondo/issues/992
@borkdude yes, this is great - we have a repo we put all our developer machine stuff in, adding this along side /.clojure/deps.edn and /.m2/settings.xml would be great!