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
109 stars 54 forks source link

Don't autocorrect Delivery's TOML or JSON files #953

Closed karmix closed 2 years ago

karmix commented 2 years ago

Signed-off-by: Doug Knight doug.knight@karmix.org

Description

Some configurations for cops will cause them to raise offenses when run against a TOML or JSON file that also happens to be syntactically valid Ruby. When customers customize cop configurations, the cops may make recommendations or perform auto-corrections that are not valid in TOML or JSON. This patch excludes these files from consideration by the cops in the Layout, Lint, Style, and Chef/Style departments to reduce the likelihood of this happening.

Related Issue

Addresses issue with PR #951 which fixed #942

Types of changes

Checklist: