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

Fix config files in ancestor dirs are ignored if another exists in home #62

Merged
merged 2 commits into from
Apr 18, 2013
Merged

Fix config files in ancestor dirs are ignored if another exists in home #62

merged 2 commits into from
Apr 18, 2013

Conversation

yujinakayama
Copy link
Collaborator

This fixes a bug below:

  • You have ~/.rubocop.yml in your home directory
  • There is project/.rubocop.yml
  • There is project/example.rb
  • Execute rubocop in project directory

In this situation, ~/.rubocop.yml is always used and project/.rubocop.yml is never used.

@bbatsov
Copy link
Collaborator

bbatsov commented Apr 17, 2013

The code looks good to me. @jonas054, would you like to share your thoughts as well?

@jonas054
Copy link
Collaborator

Yes, I'm responsible for that bug. I think I made config_from_dotfile too complicated by doing caching and search logic in one method. I might want to think about refactoring it later. Anyway, it's a good correction. Thanks @yujinakayama!

bbatsov added a commit that referenced this pull request Apr 18, 2013
Fix config files in ancestor dirs are ignored if another exists in home
@bbatsov bbatsov merged commit 9c252da into rubocop:master Apr 18, 2013
@bbatsov
Copy link
Collaborator

bbatsov commented Apr 18, 2013

Thanks!

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 this pull request may close these issues.

3 participants