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

Cookstyle configuration "streams" #967

Open dafyddcrosby opened 8 months ago

dafyddcrosby commented 8 months ago

Motivation

As a Chef power user,
I want to use the latest and greatest Cops,
so that I can see and fix problems early, and get the most out of Cookstyle.

As an off-and-on Chef user,
I want to be able to occasionally update the set of Cops,
so that I can incrementally improve my codebase when I have time.

As a CI owner/someone who can't change code often,
I want to see a CI that doesn't go red without notice,
so that I can do other things besides chasing style points.

Specification

The current thinking is something like TargetChefVersion in .rubocop.yml. We can specify a CookstyleCopStream which has values of stable (the current set, which almost never changes save for bug fixes), dates for yearly snapshots (eg YYYYMMDD) so that new Cops can be ratcheted in easily, and latest (what it says on the tin).

Downstream Impact

dafyddcrosby commented 8 months ago

After stepping away from the keyboard, I think we'll want to strike stable and instead have the first snapshot be the default. We don't want to imply that it's any more stable than the other snapshots or latest, just that it's a fixed point in time, showing how far removed that first snapshot is from the other snapshots/latest as a point of reference.