# Cookstyle 6.10 released with 3 new Chef cops!

**URL:** <https://discourse.chef.io/t/cookstyle-6-10-released-with-3-new-chef-cops/17370>\
**Category:** Chef Release Announcements\
**Created:** [July 7, 2020, 8:29pm UTC](https://discourse.chef.io/t/cookstyle-6-10-released-with-3-new-chef-cops/17370 "2020-07-07T20:29:04Z")\
**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:** [July 7, 2020, 8:29pm UTC](https://discourse.chef.io/t/cookstyle-6-10-released-with-3-new-chef-cops/17370/1 "2020-07-07T20:29:04Z")

</div>

Hey folks,

We have a new release of Cookstyle new cops for cleaning up redundant code and helping with automatic documentation.

### 3 New Cops

#### ChefSharing/IncludeResourceExamples

The `ChefSharing/IncludeResourceExamples` cop detects resources that don't include examples. The `chef-resource-inspector` command displays resource examples and those examples can be used to automatically generate documentation.

`Enabled by default`: False

`Autocorrects`: No

#### ChefRedundantCode/MultiplePlatformChecks

The `ChefRedundantCode/MultiplePlatformChecks` cop detects usage of multiple `platform?` or `platform_family?` helpers that can be simplified by passing multiple values to a single helper.

`Enabled by default`: True

`Autocorrects`: Yes

`Examples:`

Conditional using multiple platform? helpers:

```ruby
if platform?('ubuntu') || platform?('centos')
  ...
end

```

Simplified conditional using a single platform? helper:

```ruby
if platform?('ubuntu', 'centos')
  ...
end

```

#### ChefRedundantCode/OhaiAttributeToString

The `ChefRedundantCode/OhaiAttributeToString` cop detects cookbooks that use `.to_s` on node attributes from Ohai that are already String type.

`Enabled by default`: True

`Autocorrects`: Yes

### Other Improvements

- RuboCop's built-in `Migration/DepartmentName` cop now suggests running cookstyle, not rubocop, to resolve cop naming deprecations.

Enjoy,  
Tim
