Open coaxial opened 4 years ago
@coaxial , try
guard :rubocop, cli: ['--display-cop-names']` do
...
end
Does anyone know why the command line option is required instead of the .rubocop.yml (AllCops/DisplayCopNames: true
)?
@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: