Skip to content

Commit

Permalink
Add Cookstyle 6.1 release notes (#593)
Browse files Browse the repository at this point in the history
* Add Cookstyle 6.1 release notes

Signed-off-by: Tim Smith <tsmith@chef.io>

* Update RELEASE_NOTES.md

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-Authored-By: pete higgins <pete@peterhiggins.org>

* Update RELEASE_NOTES.md

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-Authored-By: pete higgins <pete@peterhiggins.org>

* Update RELEASE_NOTES.md

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-Authored-By: pete higgins <pete@peterhiggins.org>

* Update RELEASE_NOTES.md

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-Authored-By: pete higgins <pete@peterhiggins.org>

* Update RELEASE_NOTES.md

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-Authored-By: Ian Maddaus <IanMadd@users.noreply.github.com>

* Update RELEASE_NOTES.md

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-Authored-By: Ian Maddaus <IanMadd@users.noreply.github.com>

* One last edit

Signed-off-by: Tim Smith <tsmith@chef.io>

Co-authored-by: pete higgins <pete@peterhiggins.org>
Co-authored-by: Ian Maddaus <IanMadd@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 27, 2020
1 parent 423232d commit 8f67011
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
## Cookstyle 6.1

### 5 New Cops

#### ChefModernize/NodeRolesInclude

The `ChefModernize/NodeRolesInclude` cop detects cookbooks that use `node['roles'].include?('foo')` to see if a particular role has been applied to a node. Use the simpler `node.role?('foo')` helper instead.

`Enabled by default`: True

`Autocorrects`: Yes

#### ChefDeprecations/PowershellCookbookHelpers

The `ChefDeprecations/PowershellCookbookHelpers` cop detects cookbooks that use the deprecated `Powershell::VersionHelper.powershell_version?` helper from the `powershell` cookbook. Chef Infra Client provides information on the installed PowerShell release at `node['powershell']['version']` and Chef Infra Client 15.8 and later includes a new `powershell_version` method which should be used when possible.

`Enabled by default`: True

`Autocorrects`: Yes

#### ChefCorrectness/ConditionalRubyShellout

The `ChefCorrectness/ConditionalRubyShellout` cop detects resources that use unnecessary Ruby code in `not_if` and `only_if` conditionals to shellout when a string can be used to avoid additional complexity.

Shelling out with ruby:
```ruby
cookbook_file '/logs/foo/error.log' do
only_if { system('wget https://www.bar.com/foobar.txt -O /dev/null') }
end
```

Shelling out without Ruby:
```ruby
cookbook_file '/logs/foo/error.log' do
only_if 'wget https://www.bar.com/foobar.txt -O /dev/null'
end
```

`Enabled by default`: True

`Autocorrects`: Yes

#### ChefSharing/IncludePropertyDescriptions

The `ChefSharing/IncludePropertyDescriptions` cop detects resource properties that don't include a description value. The `chef-resource-inspector` command displays the description value in resource properties and that description can be used to automatically generate documentation.

`Enabled by default`: False

`Autocorrects`: No

#### ChefSharing/IncludeResourceDescriptions

The `ChefSharing/IncludeResourceDescriptions` cop detects resources that don't include a description. The `chef-resource-inspector` command displays the description value in resources and that description can be used to automatically generate documentation.

`Enabled by default`: False

`Autocorrects`: No

### Other Changes

- `ChefModernize/PowershellInstallWindowsFeature` now correctly identifies the required Chef Infra Client release as 14.0 and later.
- The `WindowsVersionHelper` cop has been moved to the `ChefDeprecations` department and now includes autocorrection for each of the helpers it identifies.

## Cookstyle 6.0

### RuboCop 0.80.1 Engine
Expand Down

0 comments on commit 8f67011

Please sign in to comment.