clojure-emacs / squiggly-clojure

Flycheck checker for Clojure, using eastwood and core.typed.
GNU General Public License v3.0
204 stars 25 forks source link

Add option to make squiggly-clojure use relative paths instead of absolute paths #43

Open dkharlan opened 7 years ago

dkharlan commented 7 years ago

I'm developing on a remote server using a port-forwarded nREPL connection. This use case doesn't work with squiggly-clojure because it sends absolute paths (which obviously don't exist on the server-side):

(--> 
  op  "eval"
  session  "879ee11d-af76-43a6-9eee-ff7dddb860f4"
  code  "(do (require 'squiggly-clojure.core) (squiggly-clojure.core/check-kb 'stuff.things \"/Users/dkharlan/src/stuff/src/stuff/things.clj\"))"
  id  "74"
)

(...snip...)

(<-- 
  id  "74"
  ns  "user"
  session  "879ee11d-af76-43a6-9eee-ff7dddb860f4"
  value  "\"[{\\\"msg\\\":\\\"Kibit:\\\\/Users\\\\/dkharlan\\\\/src\\\\/stuff\\\\/src\\\\/stuff\\\\/things.clj (No such file or directory)\\\",\\\"column\\\":1,\\\"level\\\":\\\"error\\\",\\\"line\\\":1}]\""
)

Would it be possible to add a config option to allow using relative paths in this situation (and / or would you accept a PR for this)?

pnf commented 7 years ago

This feature would actually have been useful to me last week! To be most flexible, I think we want to be able to specify the root directory on both sides, with defaults computed by climbing up to a directory named "src".
I'd certainly accept a PR if you want to have a go at it.

On Nov 3, 2016, at 10:30 AM, Dave Harlan notifications@github.com wrote I'm developing on a remote server using a port-forwarded nREPL connection. This use case doesn't work with squiggly-clojure because it sends absolute paths (which obviously don't exist on the server-side):

(--> op "eval" session "879ee11d-af76-43a6-9eee-ff7dddb860f4" code "(do (require 'squiggly-clojure.core) (squiggly-clojure.core/check-kb 'stuff.things \"/Users/dkharlan/src/stuff/src/stuff/things.clj\"))" id "74" )

(...snip...)

(<-- id "74" ns "user" session "879ee11d-af76-43a6-9eee-ff7dddb860f4" value "\"[{\"msg\":\"Kibit:\/Users\/dkharlan\/src\/stuff\/src\/stuff\/things.clj (No such file or directory)\",\"column\":1,\"level\":\"error\",\"line\":1}]\"" ) Would it be possible to add a config option to allow using relative paths in this situation (and / or would you accept a PR for this)?

― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

dkharlan commented 7 years ago

Sure! It might take me a bit to find some time to work on this, but I'll submit when I can.

MalloZup commented 5 years ago

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it