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
Passing --except Layout/LineLength to rubocop also seems to disable the check for Lint/RedundantCopDisableDirective
Expected behavior
$ cat test.rb
# frozen_string_literal: true
# sample for bug report
class Foo
def bar # rubocop:disable Style/EmptyMethod
end
end
$ rubocop --debug test.rb
For /home/klobad/Documents/FormKeep/github/formkeep: Default configuration from /home/klobad/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rubocop-1.39.0/config/default.yml
Use parallel by default.
Skipping parallel inspection: only a single file needs inspection
Inspecting 1 file
Scanning /home/klobad/Documents/FormKeep/github/formkeep/test.rb
Loading cache from /home/klobad/.cache/rubocop_cache/0b06607358ac7b70cd9f357781448c84c00cea38/6d7a3b621ca1730e04accd938619e4bdab66cfb1/9870e83daf2842de6c7a90ae3e7cfda716aa2300
W
Offenses:
test.rb:5:11: W: [Correctable] Lint/RedundantCopDisableDirective: Unnecessary disabling of Style/EmptyMethod.
def bar # rubocop:disable Style/EmptyMethod
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1 file inspected, 1 offense detected, 1 offense autocorrectable
Finished in 0.0879353420168627 seconds
Actual behavior
$ rubocop --debug --except Layout/LineLength test.rb
For /home/klobad/Documents/FormKeep/github/formkeep: Default configuration from /home/klobad/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/rubocop-1.39.0/config/default.yml
Use parallel by default.
Skipping parallel inspection: only a single file needs inspection
Inspecting 1 file
Scanning /home/klobad/Documents/FormKeep/github/formkeep/test.rb
Loading cache from /home/klobad/.cache/rubocop_cache/0b06607358ac7b70cd9f357781448c84c00cea38/e6f1404efc7309d647c24ff845e2475472ce11fc/9870e83daf2842de6c7a90ae3e7cfda716aa2300
.
1 file inspected, no offenses detected
Finished in 0.08694695797748864 seconds
Steps to reproduce the problem
add the --except Layout/LineLength parameter to the command line.
Passing
--except Layout/LineLength
to rubocop also seems to disable the check forLint/RedundantCopDisableDirective
Expected behavior
Actual behavior
Steps to reproduce the problem
add the
--except Layout/LineLength
parameter to the command line.RuboCop version
The text was updated successfully, but these errors were encountered: