From 67a34e13d1867d4a367400784e44910bb196da95 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 19 May 2020 12:34:21 -0700 Subject: [PATCH 1/2] Add Cookstyle 6.5 release notes Signed-off-by: Tim Smith --- RELEASE_NOTES.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3b1ff4ef6..1d8ae5810 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,39 @@ +## Cookstyle 6.5 + +### 2 New Cops + +#### ChefModernize/ShellOutHelper + +The `ChefModernize/ShellOutHelper` cop detects cookbooks that use `Mixlib::ShellOut.new('foo').run_command` instead of the `shell_out('foo')` helper included in Chef Infra Client 12.11 and later. + +`Enabled by default`: True + +`Autocorrects`: Yes + +#### ChefDeprecations/Ruby27KeywordArgumentWarnings + +The `ChefDeprecations/Ruby27KeywordArgumentWarnings` cop detects cookbooks that use the `shell_out` helper with shellout options within hash braces. The usage of braces in this helper will result in Ruby 2.7 deprecation warnings when running on Chef Infra Client 16 and later. + +**With braces:** + +```ruby +shell_out!('hostnamectl status', { returns: [0, 1] }) +``` + +**Without braces:** + +```ruby +shell_out!('hostnamectl status', returns: [0, 1]) +``` + +`Enabled by default`: True + +`Autocorrects`: Yes + +### Other Improvements + +- The `ChefDeprecations/DeprecatedChefSpecPlatform` cop has been updated to detect and correct additional legacy platform releases in ChefSpecs. + ## Cookstyle 6.4 ### RuboCop 0.83 From d11444dcb377f931e51cf194920d6e3d7bad1ce3 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 19 May 2020 12:55:30 -0700 Subject: [PATCH 2/2] Update RELEASE_NOTES.md Signed-off-by: Tim Smith Co-authored-by: Ian Maddaus --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1d8ae5810..50f439ed2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -12,7 +12,7 @@ The `ChefModernize/ShellOutHelper` cop detects cookbooks that use `Mixlib::Shell #### ChefDeprecations/Ruby27KeywordArgumentWarnings -The `ChefDeprecations/Ruby27KeywordArgumentWarnings` cop detects cookbooks that use the `shell_out` helper with shellout options within hash braces. The usage of braces in this helper will result in Ruby 2.7 deprecation warnings when running on Chef Infra Client 16 and later. +The `ChefDeprecations/Ruby27KeywordArgumentWarnings` cop detects cookbooks that use the `shell_out` helper with shellout options within hash braces. Using braces in this helper will result in Ruby 2.7 deprecation warnings when running on Chef Infra Client 16 and later. **With braces:**