-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
Compare:
$ bundle exec rubocop
Inspecting 14 files
............W.
Offenses:
spec/my_spec.rb:42:1: W: Lint/MissingCopEnableDirective: Re-enable Lint/HandleExceptions cop with # rubocop:enable after disabling it.
# rescue SystemExit # rubocop:disable Lint/HandleExceptions
^
spec/my_spec.rb:43:26: C: Layout/TrailingWhitespace: Trailing whitespace detected.
rescue SystemExit
^
14 files inspected, 2 offenses detected
with
$ bundle exec guard
08:02:31 - INFO - Guard::RSpec is running
08:02:31 - INFO - Inspecting Ruby code style of all files
Inspecting 14 files
............W.
Offenses:
spec/my_spec.rb:42:1: W: Re-enable Lint/HandleExceptions cop with # rubocop:enable after disabling it.
# rescue SystemExit # rubocop:disable Lint/HandleExceptions
^
spec/my_spec.rb:43:26: C: Trailing whitespace detected.
rescue SystemExit
^
When running guard-rubocop
, the name of the cop that matches the lint error isn't written. But it is when running rubocop directly. I have no options set on my guard:
guard :rubocop do
watch('Gemfile')
watch('Rakefile')
watch(/.+\.rb$/)
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
end
Metadata
Metadata
Assignees
Labels
No labels