chef / cookstyle

A linting tool that helps you to write better Chef Infra cookbooks and InSpec profiles by detecting and automatically correcting style, syntax, and logic mistakes in your code.
Apache License 2.0
107 stars 54 forks source link

Allow departments to be enabled/disabled by users #935

Closed jaymzh closed 2 years ago

jaymzh commented 2 years ago

Over in https://github.com/rubocop/rubocop/issues/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

Checklist: