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 complains about rubocop-todo.yml from parent directory #927

Closed
tmorris-fiksu opened this issue Mar 28, 2014 · 2 comments
Closed

Comments

@tmorris-fiksu
Copy link
Contributor

When a .rubocop.yml occurs in a parent directory, it is not used, I believe. Rather, it uses the .rubocop.yml in the child directory.

However, --auto-gen reaches up into the parent directories to find a reference to ruboocp-todo.yml, and complains (incorrectly):

$ rubocop --auto-gen
Remove rubocop-todo.yml from the current configuration before generating it again.
@jonas054
Copy link
Collaborator

The reason rubocop stops and asks the user to remove rubocop-todo.yml from the configuration is that it can't have configuration settings from the old todo file active while it's generating the new one. Because that would produce a rubocop-todo.yml containing only the offenses not disabled in the old one.

A better solution is probably to just skip all rubocop-todo.yml files while reading configuration when --auto-gen-config is given. It would overwrite an existing rubocop-todo.yml without asking, but I think that's no big issue.

@bbatsov @yujinakayama Any opinions on this?

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 30, 2014

@jonas054 👍 For your suggestion.

bbatsov added a commit that referenced this issue Mar 30, 2014
[Fix #927] Overwrite rubocop-todo.yml without asking
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

No branches or pull requests

3 participants