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

New Cop generators #976

Open dafyddcrosby opened 4 months ago

dafyddcrosby commented 4 months ago

After the Cookstyle hack fest, the amount of boilerplate necessary to create a new Cop became apparent, and this seems like a problem worth solving.

Motivation

As a new Cookstyle dev, I want to be able to write a "hello world" Cop easily So that I'm able to get started on basic tasks without needing to read RuboCop docs for N hours

As an experienced Cookstyle dev, I want to avoid writing boilerplate So that I can write new Cops quickly

Specification

While I think the case of writing private Cops is worth investigating, to start this should be a Rake task that writes out: