-
Notifications
You must be signed in to change notification settings - Fork 38
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
Autocorrect errors #34
Comments
Awesome! But how to handle the cases where problems comes from third-party shards? |
We don't inspect third-party shards. |
Actually I was thinking in this case: if OtherLib.has_something?
# ...
end But I didn't realised Ameba only checks for methods definitions, not calls. Sorry! |
Ah, okay that is an interesting point. For this particular rule (PredicateName) that wouldn't be a case, because it is looking for the method definition, not the method call. So it will not report an error and there will be nothing to autocorrect. But there might be other rules which could do other inspections for third-party calls. Will keep this in mind, thank you. |
Oh yes please! I don't want to use a linter that doesn't fix the things it knows how to :) |
in my project i have ~500 errors: |
@kostya @anicholson any help is appreciated :) Btw, LargeNumbers is now disabled by default in master. |
Closed by |
The ability to autocorrect sources using a list of found errors. For example, me as a user seeing this error:
would love to be able to automatically convert it to:
Should be doable with
Crystal::Transformer
. Here is a simple example:https://github.com/crystal-lang/crystal/blob/master/samples/compiler/transformer_example.cr
The text was updated successfully, but these errors were encountered: