Running bundle exec rubocop --auto-gen-config will edit .rubocop.yml to inherit from .rubocop_todo.yml. If the latter is removed, subsequently running bundle exec rubocop will result in an unhandled exception.
I think we should emit a warning instead, or worst case exit with an appropriate message.
Warning: inherited configuration `.rubocop_todo.yml` not found.
(RuboCop continues to run.)
No such file or directory @ rb_sysopen - /Users/drenmi/Workspace/Rubocop/rubocop/.rubocop_todo.yml
bundle exec rubocop --auto-gen-config.rubocop_todo.ymlbundle exec rubocopInclude the output of rubocop -V:
$ rubocop -V
0.42.0 (using Parser 2.3.1.2, running on ruby 2.3.0 x86_64-darwin15)
Maybe still make it fail with a more clear error message unless the user is running with --auto-gen-config? Only issuing a warning will probably result in more confusion if all of the sudden rubocop is complaining about a bunch of violations that were previously suppressed
Yeah. I'm okay with that too. 馃榾
I couldn't reproduce the problem.
Rubocop Version
0.42.0 (using Parser 2.3.1.2, running on ruby 2.2.4 x86_64-darwin15)
Steps Followed
bundle exec rubocop --auto-gen-config.rubocop_todo.ymlbundle exec rubocop Tried with ruby 2.3.0 as well.
@absk1317: Something has changed on current master that requires you to manually add the inherit_from to the configuration file.
As evidenced by the message when running bundle exec rubocop --auto-gen-config:
Run
rubocop --config .rubocop_todo.yml, or addinherit_from: .rubocop_todo.ymlin a .rubocop.yml file.
Something has changed on current master that requires you to manually add the inherit_from to the configuration file.
As far as I know, it's always been like that.
:+1: on failing with an error message pointing to the unsuccessful inherit_from.
Given that this has been approved by Jonas, I'd be happy to work on it, unless anyone else already is?
@jaredbeck: Feel free to have a go at it. Would love to see this in place. 馃檪
Most helpful comment
As far as I know, it's always been like that.
:+1: on failing with an error message pointing to the unsuccessful
inherit_from.