Skip to content
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

RedundantCopDisableDirective auto-correction removes comments #9822

Closed
aglushkov opened this issue May 25, 2021 · 0 comments · Fixed by #9823
Closed

RedundantCopDisableDirective auto-correction removes comments #9822

aglushkov opened this issue May 25, 2021 · 0 comments · Fixed by #9823
Labels

Comments

@aglushkov
Copy link

Auto correction with rubocop -a, removes such comment line completely:

# not very long comment # rubocop:disable Layout/LineLength

Expected behavior

Only # rubocop:disable Layout/LineLength part must be deleted

RuboCop version

$ [bundle exec] rubocop -V
1.14.0 (using Parser 3.0.1.1, rubocop-ast 1.5.0, running on ruby 2.7.2 x86_64-linux)
  - rubocop-performance 1.11.3
  - rubocop-rails 2.10.1
@koic koic added the bug label May 25, 2021
koic added a commit to koic/rubocop that referenced this issue May 25, 2021
…ective`

Fixes rubocop#9822.

This PR fixes a false directive comment range for `Lint/RedundantCopDisableDirective`.
bbatsov pushed a commit that referenced this issue May 26, 2021
Fixes #9822.

This PR fixes a false directive comment range for `Lint/RedundantCopDisableDirective`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants