# Cookstyle 5.17 released with 3 new Chef cops!

**URL:** <https://discourse.chef.io/t/cookstyle-5-17-released-with-3-new-chef-cops/16423>\
**Category:** Chef Release Announcements\
**Created:** [December 21, 2019, 12:47am UTC](https://discourse.chef.io/t/cookstyle-5-17-released-with-3-new-chef-cops/16423 "2019-12-21T00:47:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tas50](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tas50/32/941_2.png) [@tas50](https://discourse.chef.io/u/tas50)\
**Post date:** [December 21, 2019, 12:47am UTC](https://discourse.chef.io/t/cookstyle-5-17-released-with-3-new-chef-cops/16423/1 "2019-12-21T00:47:02Z")

</div>

Hey everyone,

Cookstyle 5.17 is now up on [Rubygems.org](http://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

The `ChefModernize/DslIncludeInResource` cop detects resources and providers that include either the `Chef::DSL::Recipe` or `Chef::DSL::IncludeRecipe` classes. Starting with Chef Infra Client 12.4+ this is done automatically for each resource and provider.

#### ChefRedundantCode/AptRepositoryNotifiesAptUpdate

The `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

The `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

- The `ChefModernize/IncludingMixinShelloutInResources` cop now also detects resources that require `chef/mixin/powershell_out` or include `Chef::Mixin::PowershellOut` as these are both performed by default in Chef Infra Client 12.4+
- The `ChefCorrectness/InvalidPlatformMetadata` now analyzes `support` metadata that is defined with an array and a loop in `metadata.rb`

Enjoy,  
Tim
