You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When adding RuboCop to an existing codebase, it's common to add an automatically generated .rubocop_todo.yml. Over time, this can become stale as code is changed. Entries in the config can end up referring to issues which no longer exist. The additional noise makes it harder to tell how many genuine issues are remaining.
Describe the solution you'd like
Add a flag to detect if the config includes redundant entries. If so, it should suggest that the user re-generates .rubocop_todo.yml.
The implementation would likely involve re-running RuboCop with --auto-gen-config option and comparing it to the existing one, ignoring any comments.
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered:
An alternative implementation could be to run the cop as normal for excluded files, but to report an error if the cop passes (or if the file no longer exists). Glob patterns may need special handling as well.
A problem I see is that sometimes we exclude files or disable cops because we're not interested in the results of that inspection. It's not always to hide existing offenses. This would be a problem if we want to implement checking of configuration in ./.rubocop.yml, or similar.
For .rubocop_todo.yml it's a bit more straight forward. The exclusions and disablings made there could always be checked to see if they are still relevant. On the other hand, is that really a significant improvement over re-running rubocop --auto-gen-config and checking the diff to see if you want to keep the changes in .rubocop_todo.yml?
Is your feature request related to a problem? Please describe.
When adding RuboCop to an existing codebase, it's common to add an automatically generated
.rubocop_todo.yml
. Over time, this can become stale as code is changed. Entries in the config can end up referring to issues which no longer exist. The additional noise makes it harder to tell how many genuine issues are remaining.Describe the solution you'd like
Add a flag to detect if the config includes redundant entries. If so, it should suggest that the user re-generates
.rubocop_todo.yml
.The implementation would likely involve re-running RuboCop with
--auto-gen-config
option and comparing it to the existing one, ignoring any comments.Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: