-
Notifications
You must be signed in to change notification settings - Fork 39
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
Replace Performance/AnyInsteadOfEmpty
with Style/EmptyInsteadOfPresent
#408
Comments
It would help if I got the names right... 😅 |
Performance/AnyInsteadOfEmpty
with Style/AnyInsteadOfPresent
Performance/AnyInsteadOfEmpty
with Style/EmptyInsteadOfPresent
I believe two things should happen, once the above mentioned PR is merged:
|
If |
@devnote-dev If it wasn't a pain already, then why would it be now? I don't know the numbers, but just looking on the amount of issues re: that - not too many projects are affected - which I find reasonable, since it's not that common to have |
True, I say this because I ran into this issue a couple months ago and just renamed the method to get around it, but I don't think it's something Ameba should do principally. |
In such a case I'd advise to simply exclude this rule on the project level ( |
There's also an option for |
Automatic migration is certainly possible. |
The blockless |
With crystal-lang/crystal#13866 going through, I believe that
Performance/AnyInsteadOfEmpty
should be replaced withStyle/EmptyInsteadOfPresent
which would check for double negation inif
/unless
statements and unnecessary!
operations in ternaries. For example:I'm placing this specifically as a
Style
rule because it has no bearing on performance, as proven by the forum thread forAnyInsteadOfEmpty
. Alternatively it could be aLint
rule but I'm not sure what that group is for.The text was updated successfully, but these errors were encountered: