After a short holiday break, we're back with a new release of Cookstyle. This new version adds 2 new cops and improves detection/autocorrection in existing cops.
2 New Cops
ChefModernize/ResourceForcingCompileTime cop detects
ohai_hint resources that are being set to run at compile-time by forcing an action on the resource block. These resources include
compile-time properties which should be set to force the resources to run at compile-time.
ChefModernize/ExecuteSysctl detects the usage of
execute to load sysctl values. Chef Infra Client 14.0+ includes the
sysctl resource which should be used to idempotently add or remove sysctl values without the need for chaining
Other fixes and changes
filesdirectories in cookbooks are now better excluded when running cookstyle against a mono-repo or other collection of multiple cookbooks.
ChefStyle/TrueClassFalseClassResourcePropertiescops now check resource attributes in addition to properties.
ChefRedundantCode/PropertyWithRequiredAndDefaultcop now supports autocorrection by removing unnecessary default values from the property.