config/cookstyle.yml in cookstyle-6.1.6 vs config/cookstyle.yml in cookstyle-6.2.5
- old
+ new
@@ -129,11 +129,22 @@
ChefStyle/UnnecessaryOSCheck:
Description: Use the platform_family?() helpers instead of node['os] == 'foo' for platform_families that match 1:1 with OS values. These helpers are easier to read and can accept multiple platform arguments, which greatly simplifies complex platform logic.
Enabled: true
VersionAdded: '5.21.0'
+ Exclude:
+ - '**/metadata.rb'
+ - '**/Berksfile'
+ChefStyle/NegatingOnlyIf:
+ Description: Use not_if instead of only_if that negates the Ruby statement with a !
+ VersionAdded: '6.2.0'
+ Enabled: true
+ Exclude:
+ - '**/metadata.rb'
+ - '**/Berksfile'
+
###############################
# ChefCorrectness: Avoiding potential problems
###############################
ChefCorrectness/ServiceResource:
@@ -1410,23 +1421,32 @@
VersionAdded: '5.19.0'
Include:
- '**/metadata.rb'
ChefRedundantCode/StringPropertyWithNilDefault:
- Description: 'Properties have a nil value by default so there is no need to set the default value to nil.'
+ Description: Properties have a nil value by default so there is no need to set the default value to nil.
Enabled: true
VersionAdded: '5.21.0'
Include:
- '**/resources/*.rb'
- '**/libraries/*.rb'
ChefRedundantCode/PropertySplatRegex:
- Description: 'There is no need to validate the input of properties in resources using a regex value that will always pass.'
+ Description: There is no need to validate the input of properties in resources using a regex value that will always pass.
Enabled: true
VersionAdded: '5.21.0'
Include:
- '**/resources/*.rb'
- '**/libraries/*.rb'
+
+ChefRedundantCode/UseCreateIfMissing:
+ Description: Use the :create_if_missing action instead of not_if with a ::File.exist(FOO) check.
+ Enabled: true
+ VersionAdded: '6.2.0'
+ Exclude:
+ - '**/metadata.rb'
+ - '**/attributes/*.rb'
+ - '**/Berksfile'
###############################
# Migrating to new patterns
###############################