Cookstyle 5.17 is now up on Rubygems.org with 3 new cops and some nice improvements to two of the existing cops. This brings the total number of Chef cops to 156! Happy new years everyone.
3 New Cops
ChefModernize/DslIncludeInResource cop detects resources and providers that include either the
Chef::DSL::IncludeRecipe classes. Starting with Chef Infra Client 12.4+ this is done automatically for each resource and provider.
ChefRedundantCode/AptRepositoryNotifiesAptUpdate cop detects
apt_repository resources that notify an
execute resource to run
apt-get update. Updating apt cache is performed automatically when the
apt_repository makes any updates to the repository config and doesn't need to be performed again afterward.
ChefRedundantCode/AptRepositoryDistributionDefault cop detects
apt_repository resources that set the
distribution property to
node['lsb']['codename'] which is the default and does not need to be set in cookbook code.
Other fixes and changes
ChefModernize/IncludingMixinShelloutInResourcescop now also detects resources that require
Chef::Mixin::PowershellOutas these are both performed by default in Chef Infra Client 12.4+
supportmetadata that is defined with an array and a loop in