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

Paths in configuration should be relative to the configuration file #892

Closed
jonas054 opened this issue Mar 16, 2014 · 1 comment · Fixed by #905
Closed

Paths in configuration should be relative to the configuration file #892

jonas054 opened this issue Mar 16, 2014 · 1 comment · Fixed by #905
Assignees
Labels

Comments

@jonas054
Copy link
Collaborator

This problem was discovered in #891.

As can be seen in https://github.com/bbatsov/rubocop/blob/master/spec/rubocop/cli_spec.rb#L1117 the paths for Include, and presumably for Exclude as well, are currently interpreted by RuboCop as relative to the current directory. They should be relative to the position of the configuration file (usually .rubocop.yml) just like AllCops: Includes and AllCops: Excludes already are.

@jonas054 jonas054 added the bug label Mar 16, 2014
@jonas054 jonas054 self-assigned this Mar 17, 2014
@jonas054
Copy link
Collaborator Author

I've started working on this.

jonas054 added a commit to jonas054/rubocop that referenced this issue Mar 18, 2014
In a file named .rubocop.yml, the paths are relative to the directory
where the configuration file is. In a configuration file with a
different name, such as default.yml, the paths are relative to the
.rubocop.yml file inheriting from it, or if there's no such file,
the current directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant