-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic replacement of suggestions #155
Comments
That's great, I'd be very interested in this. How does it handle preserving whitespace/indentation/line splitting? |
Great - I'll put together a PR 👍
Perserving whitespace, indentation, newlines, and comments is all provided by https://github.com/xsc/rewrite-clj (it looks like it uses a parser combinator, but I haven't dug very much into it https://github.com/xsc/rewrite-clj/blob/master/src/rewrite_clj/parser/core.clj). |
So I haven't pulled out a profiler (yet) but just based on running this plugin I'm deeply suspicious of the performance characteristics of this implementation. When linting clojure.core, it takes about 15-30 seconds of I don't know what idling all my cores (so probably thrashing memory) to discover that That said I love this idea and definitely want to see something like this in kibit. |
Update, started linting Jaunt at 12:56am crashed at 6:22am, did not write a result file. I suspect that something to do with the replacement algorithm is at least quadratic on file size. |
Might be a good candidate for http://accidentallyquadratic.tumblr.com once the issue is found. |
Introduces `--replace` and `--interactive` cli arguments to automatically replace suggestions in source files. Initial port from jpb/kibit-replace b49410c Resolves clj-commons#155
@arrdem you are correct in your concern about the performance of |
I've created a small plugin that automatically replaces kibit suggestions in source files. Right now it goes something like this:
Is this something that you would be interested in including in kibit itself?
The text was updated successfully, but these errors were encountered: