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.
There's already a lot of overlap with Chefstyle, and maintaining one repo instead of two makes development and maintenance easier for everyone. I've imported the files from main (currently https://github.com/chef/chefstyle/tree/129344227d927ea67f228540654a6718265d03cd) and only changed chefstyle.yml as Chef/Ruby/Ruby27KeywordArgumentWarnings is already available in Cookstyle as Chef/Deprecations/Ruby27KeywordArgumentWarnings.
To run the chefstyle configs one uses the --chefstyle argument (captured in bin/cookstyle to avoid more invasive patching of RuboCop), which uses chefstyle.yml instead of cookstyle.yml.
Description
There's already a lot of overlap with Chefstyle, and maintaining one repo instead of two makes development and maintenance easier for everyone. I've imported the files from
main
(currently https://github.com/chef/chefstyle/tree/129344227d927ea67f228540654a6718265d03cd) and only changed chefstyle.yml as Chef/Ruby/Ruby27KeywordArgumentWarnings is already available in Cookstyle asChef/Deprecations/Ruby27KeywordArgumentWarnings
.To run the chefstyle configs one uses the
--chefstyle
argument (captured inbin/cookstyle
to avoid more invasive patching of RuboCop), which useschefstyle.yml
instead ofcookstyle.yml
.Diff of
bin/chefstyle --show-cops
in chefstyle repo andbin/cookstyle --chefstyle --show-cops
: https://gist.github.com/dafyddcrosby/417dde82d1507313f59dae80898c5271While this makes the imported
Chef/Ruby
cops available to Cookstyle, they are disabled by default. Before and after diff ofcookstyle --show-cops
: https://gist.github.com/dafyddcrosby/922112f26f0d90f66a4d7b832f7a465aRelated Issue
Types of changes
Checklist:
Gemfile.lock
has changed, I have used--conservative
to do it and included the full output in the Description above.