# Cookstyle 6.21 released with 2 new Chef Cops!

**URL:** <https://discourse.chef.io/t/cookstyle-6-21-released-with-2-new-chef-cops/17843>\
**Category:** Chef Release Announcements\
**Created:** [October 15, 2020, 8:49pm UTC](https://discourse.chef.io/t/cookstyle-6-21-released-with-2-new-chef-cops/17843 "2020-10-15T20:49:39Z")\
**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:** [October 15, 2020, 8:49pm UTC](https://discourse.chef.io/t/cookstyle-6-21-released-with-2-new-chef-cops/17843/1 "2020-10-15T20:49:39Z")

</div>

Hey everyone,

We have a new release of Cookstyle out today. This release includes 2 new cops to get your cookbooks ready for the latest Chef Infra Client releases.

#### ChefCorrectness/OctalModeAsString

The `ChefCorrectness/OctalModeAsString` cop detects `mode` properties that incorrectly use a string to represent an octal value. We highly recommend using strings which contain a base 10 mode value, but even if you want to use octal values, they can't be passed as strings.

`Enabled by default`: True

`Autocorrects`: False

#### ChefDeprecations/UseYamlDump

The `ChefDeprecations/UseYamlDump` cop detects cookbooks that use the `.to_yaml` method. Chef Infra Client 16.5 introduced performance enhancements to Ruby library loading and due to the underlying implementation of Ruby's `.to_yaml` method, it does not automatically load the `yaml` library. We recommend using `YAML.dump()` instead, which is functionally equivalent, and also properly loads the `yaml` library.

`Enabled by default`: True

`Autocorrects`: True

Enjoy,  
Tim
