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

Allowing inherit_mode in AllCops #7230

Closed
tomprats opened this issue Jul 23, 2019 · 2 comments
Closed

Allowing inherit_mode in AllCops #7230

tomprats opened this issue Jul 23, 2019 · 2 comments
Labels
feature request stale Issues that haven't been active in a while

Comments

@tomprats
Copy link

I searched through all the other issues with inherit_mode and while there's a lot of discussion, I think they talk about changing defaults or how the inheritance is applied. I'm talking about allowing inherit_mode in a new place to achieve something different.

Is your feature request related to a problem? Please describe.

inherit_mode can be specified for the entire config, as well as specific cops, but it cannot be specified by AllCops.

The main difference is that I only want to affect AllCops:Exclude. We don't want to change the inherit_mode for individual cops.

Describe the solution you'd like

Allowing the following example would exclude everything in Airbnb's AllCops:Exclude as well as the local AllCops:Exclude

inherit_gem:
  rubocop-airbnb: .rubocop_airbnb.yml

AllCops:
  inherit_mode:
    merge:
      - Exclude
  Exclude:
    - db/schema.rb

Describe alternatives you've considered

My current solution is to change the inherit_mode for the entire config file, but that also changes how each individual cop inherits.

inherit_gem:
  rubocop-airbnb: .rubocop_airbnb.yml

inherit_mode:
  merge:
    - Exclude

AllCops:
  Exclude:
    - db/schema.rb

Another option is to just copy whatever is in Airbnb's and add it to mine.

dentarg referenced this issue in Starkast/wikimum Oct 23, 2019
It is in .gitignore and I put my tmp stuff there.
@stale
Copy link

stale bot commented Feb 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale Issues that haven't been active in a while label Feb 21, 2020
@stale
Copy link

stale bot commented May 21, 2020

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

@stale stale bot closed this as completed May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request stale Issues that haven't been active in a while
Projects
None yet
Development

No branches or pull requests

2 participants