Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto-gen-config command fails with Configuration file not found #10659

Closed
nobuyo opened this issue May 21, 2022 · 0 comments · Fixed by #10660
Closed

auto-gen-config command fails with Configuration file not found #10659

nobuyo opened this issue May 21, 2022 · 0 comments · Fixed by #10660

Comments

@nobuyo
Copy link
Contributor

nobuyo commented May 21, 2022

The auto-gen-config command fails if an optional config in a subdirectory is given as an option.


Expected behavior

The command should finish successfully.

Actual behavior

The command fails with following error:

$ [bundle exec] rubocop --auto-gen-config --config test/.rubocop_wip.yml
Configuration file not found: /Users/nobuyo/dev/rubocop-custom-config-regenerate-todo-demo/test/.rubocop_todo.yml

Steps to reproduce the problem

  1. Create an offensive ruby file, and ./dir/.rubocop_config.yml.
  2. Run rubocop --auto-gen-config --config dir/.rubocop_config.yml.
  3. Run rubocop --config dir/.rubocop_config.yml.

RuboCop version

$ [bundle exec] rubocop -V
1.29.1 (using Parser 3.1.2.0, rubocop-ast 1.18.0, running on ruby 3.1.2 x86_64-darwin21)
@nobuyo nobuyo changed the title The auto-gen-config command fails with Configuration file not found auto-gen-config command fails with Configuration file not found May 21, 2022
nobuyo added a commit to nobuyo/rubocop that referenced this issue May 21, 2022
…` by `auto-gen-config` is incorrect if specified config file in a subdirectory as an option
bbatsov pushed a commit that referenced this issue May 26, 2022
…uto-gen-config` is incorrect if specified config file in a subdirectory as an option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant