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
promote Performance/RedundantSortBy to Style/RedundantSortBy #6871
Comments
Seems you made some mistake here. |
Fixed. |
I agree about the first two, but |
I crossed it out in the report. |
Well, I not that worried about those cops as they are not going to die. :-) Took a quick look at some of the others, but nothing seemed like an obvious choice to go to style. Let me know if you have any ideas. |
I know, but I would be happy to have in optional performance add-on restricted to rules making code style worse, this way I can easily disable/enable them as a group. |
Unlike many other Performance cops
Performance/RedundantSortBy
is not making code less readable and is a good idea independent from performance improvements.As #5977 will cause performance cops to be disabled by default I suggest to rescue this one
It may be also useful to expand description with a note that this change may improve performance (as it would no longer be implied)
Other usual issue fields are not applicable - I spotted it during reviewing https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml
#6637 ("promote Performance/LstripRstrip to Style/LstripRstrip") is a closely related issue that was fixed in #6870 by @anuja-joshi
There are also
Performance/UnneededSort
,Performance/Sample
,that also improve (at least in my opinion) code quality, independent from performance improvements but I think that creating now separate issues for them is a poor idea (if that would be a good idea I may create a separate issue for each, I am planning to do it also if RedundantSortBy would be fixed without fixing three additional ones).Performance/RedundantMatch
The text was updated successfully, but these errors were encountered: