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

Allow departments to be enabled/disabled by users #935

Merged
merged 1 commit into from Jan 24, 2022

Conversation

jaymzh
Copy link
Collaborator

@jaymzh jaymzh commented Jan 22, 2022

Over in rubocop/rubocop#9752 we figured out
that the reason end-users can't enable/disable Cookstyle departments is
because Enabled isn't in the config and thus can't be
overridden
.

This change will allow a user to not only do the obvious:

Chef/Correctness:
  Enabled: false

But more interestingly do something like this:

AllCops:
  DisabledByDefault: true

Chef/Correctness:
  Enabled: true

CC @jonas054

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

Over in rubocop/rubocop#9752 we figured out
that the reason end-users can't enable/disable Cookstyle departments is
because `Enabled` isn't in the config and thus [can't be
overridden](rubocop/rubocop#9752 (comment)).

This change will allow a user to not only do the obvious:

```yaml
Chef/Correctness:
  Enabled: false
```

But more interestingly do something like this:

```yaml
AllCops:
  DisabledByDefault: true

Chef/Correctness:
  Enabled: true
```

CC @jonas054

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants