NoahTheDuke / splint

A Clojure linter focused on style and code shape.
https://cljdoc.org/d/io.github.noahtheduke/splint/
Mozilla Public License 2.0
115 stars 2 forks source link

FR: Use rewrite-clj to perform replacements with code suggestions #17

Closed NoahTheDuke closed 1 month ago

NoahTheDuke commented 6 months ago

not sure if prewalk or postwalk, tbh. i'll have to think on it.

NoahTheDuke commented 5 months ago

Related to #7.

NoahTheDuke commented 2 months ago

I can do this by relying on :source in edamame. This will have to wait until https://github.com/borkdude/edamame/pull/112 is merged and a new release is cut, but once it's available, I can use rewrite-clj to parse the source of forms in diagnostics after a run and then step through them one by one and offer a replacement.

Hmm actually, that might not work, we'll see. I might need to traverse the entire file with rewrite-clj as the source won't match once I've replaced something once.