--config FILE
argument appears to be ignored when --auto-gen-config
is used
#5934
Labels
--config FILE
argument appears to be ignored when --auto-gen-config
is used
#5934
Instead of using
.rubocop.yml
default, I'm usingrubocop --config my_path/my_file.yml
. In attempting to incorporate--auto-gen-config
andtodo.yml
in order for an incremental fix workflow, I found thatrubocop --config my_path/my_file.yml --auto-gen-config
operates as if I ranrubocop
.Specifically, this means that all the rules in my config are effectively ignored (and a new
.rubocop.yml
file is added for me as well).My workaround is renaming
my_path/my_file.yml
to.rubocop.yml
, and then the--auto-gen-config
feature works as expected. (Great to have, by the way!)Expected behavior
rubocop --config my_path/my_file.yml --auto-gen-config
should operate onmy_path/my_file.yml
as if it were named.rubocop.yml
Actual behavior
My config file is completely ignored, as if it didn't exist. A new
.rubocop.yml
is created and modified to inherit.rubocop_todo.yml
as well.Steps to reproduce the problem
Create a custom rubocop configuration at
some_path/some_name.yml
with a Cop disabled. In a codebase where that Cop would activate,rubocop --config some_path/some_name.yml
should not alert.Then, run
rubocop --config some_path/some_name.yml --auto-gen-config
, and the cop will have been "reactivated" because the--config
argument appears to get ignored.RuboCop version
0.56.0 (using Parser 2.5.1.0, running on ruby 2.3.7 x86_64-darwin16)
The text was updated successfully, but these errors were encountered: