Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't load exclusions from personal files when passing a config with …
…custom name If passing a configuration with a custom name, like `rubocop --config-file .my_custom_project_config.yml`, that configuration should act as the project configuration and we want personal configuration files disregarded. That's actually the only case where `find_files_upwards` can return an empty list, because when given an existing `.rubocop.yml` as the starting point, it will at least return that file, and the fallback to personal config files will not be applied. Well, there's another case where `find_files_upwards` could return an empty list, which is when giving it a non existent file as the starting point. However, I don't think that ever happens in real life, and in tests it was only happening once, and due to a typo I believe. So, we can completely remove the explicit fallback to look for exclusions in personal configuration files.
- Loading branch information
1 parent
05feb76
commit 9451170
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters