-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Issues with Performance/Casecmp #2614
Comments
deivid-rodriguez
pushed a commit
to deivid-rodriguez/nipanipa
that referenced
this issue
Jan 9, 2016
What if it autocorrected to |
I still find it less readable, but it's not up to me... :) |
@segiddins, since this cop is for "performance", could you benchmark the |
deivid-rodriguez
changed the title
Issues with Performance/CaseCmp
Issues with Performance/Casecmp
Jan 10, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Two issues with this cop:
'HOLA'.downcase == 'hola'
gets autocorrected to'HOLA'.casecmp('hola')
, but the first version returns a boolean and the second an integer.'HOLA'.casecmp('hola') == 0
which is arguably less readable. I think performance cops should only be enabled by defaulf if they don't harm readability.The text was updated successfully, but these errors were encountered: