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
$ 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
The text was updated successfully, but these errors were encountered:
@barelyknown One thing is that guard-rubocop does not run rubocop with bundler and you can't simply add cmd: "bundle exec rubocop" to Guardfile nor cmd: %w[bundle exec rubocop] without a change in the gem (see #55).
In addition, it then only works if you pass cli: "--config .rubocop.yml" to the guard. Couldn't figure out yet, why this is the case.
edit: at least it did it after I changed that. Now it's kinda back to where it was before.
Compare:
with
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:The text was updated successfully, but these errors were encountered: