-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Integrate RuboCop Performance #4099
Comments
This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 7 days |
Hi @ashie, |
Starting with a minimal cop may be useful, but I don't know whether the improvements may vary on supported ruby-version. P.S. After merged such a PR, integrating small cop rule into CI (as a next step) is good way to keep it. |
Is your feature request related to a problem? Please describe.
There are a few code fragments that could be improved in terms of performance and readability. E.g. some tests use
select...size
instead of justcount
orselect...first
instead offind
. Many of these issues can be automatically detected and often even fixed by RuboCop Performance (extension of Rubocop).Describe the solution you'd like
Fix all issues discovered by RuboCop Performance and integrate it into the CI. It most likely is not favorable to run RuboCop with all checks enabled since the style checks would require a complete linting of the project which breaks
git blame
. Running only the performance checks ensures that the number of changes is manageable (~180 changes).Describe alternatives you've considered
There are other linters with a focus on performance, e.g. fasterer, but RuboCop Performance provides the advantage that it can automatically correct many issues.
Additional context
I can take over this task, if it gets accepted.
The text was updated successfully, but these errors were encountered: