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
Migration cop says it autocorrects, but it doesn't if the comment is enable #7814
Comments
This would be a false positive because |
Using Maybe we could improve message to something like |
This is interesting. On the other hand, this cop's role is to complement a department name. Including typo detection in this cop could be a bit more complicated. IMHO, perhaps it would be better to provide a different feature for typo detection. |
### Summary Fixes rubocop#7814. This PR fixes a false positive for `Migrate/DepartmentName` cop when inspecting an unexpected disable comment format. e.g. `# rubocop:disable Style:BlockComments` The above expected format is `# rubocop:disable Style/BlockComments`. ### Other Information `Migration/DepartmentName` cop's role is to complement a department name. The role would be simple if another feature could detect unexpected disable comment format.
### Summary Fixes #7814. This PR fixes a false positive for `Migrate/DepartmentName` cop when inspecting an unexpected disable comment format. e.g. `# rubocop:disable Style:BlockComments` The above expected format is `# rubocop:disable Style/BlockComments`. ### Other Information `Migration/DepartmentName` cop's role is to complement a department name. The role would be simple if another feature could detect unexpected disable comment format.
Thanks for the quick fix @koic |
Expected behavior
Cop should actually autocorrect rubocop comment
Actual behavior
RuboCop shows that it autocorrects the code, but it does not.
Steps to reproduce the problem
Try to autocorrect this code:
RuboCop version
master
The text was updated successfully, but these errors were encountered: