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

Add support for RuboCop config pre-processing #1809

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 4, 2020

  1. Add support for RuboCop config pre-processing

    RuboCop [0.83.0 (2020-05-11)][1] [added support][2] for [configuration pre-processing][3] by
    running the config through ERB.
    
    This PR "fixes" the Hound CI RuboCop config parser to also run the config through ERB, although I'm
    not familiar with the internals of Hound to know whether this will work in practice (eg what `pwd`
    is used?).
    
    An alternative/better approach for the future would be use RuboCop's own code (specifically
    [`RuboCop::ConfigLoader`][4]) to parse the config? Obviously that would be a bigger change.
    
    Thoughts?
    
    [1]: https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md#0830-2020-05-11
    [2]: rubocop/rubocop#7920
    [3]: https://docs.rubocop.org/rubocop/configuration.html#pre-processing
    [4]: https://github.com/rubocop-hq/rubocop/blob/4943d5005b44c61973910b77adbb5fa42209bbfd/lib/rubocop/config_loader.rb#L56
    joehorsnell committed Aug 4, 2020
    Configuration menu
    Copy the full SHA
    6c8ae3b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dd5adc6 View commit details
    Browse the repository at this point in the history