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

Don't load exclusions from personal files when passing a config with a custom name #8239

Merged

Commits on Jul 7, 2020

  1. 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.
    deivid-rodriguez committed Jul 7, 2020
    Copy the full SHA
    9451170 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    2e02a04 View commit details
    Browse the repository at this point in the history