config/cookstyle.yml in cookstyle-5.7.0 vs config/cookstyle.yml in cookstyle-5.8.1

- old
+ new

@@ -69,10 +69,17 @@ VersionAdded: '5.6.0' Exclude: - '**/metadata.rb' - '**/libraries/*' +ChefStyle/SimplifyPlatformMajorVersionCheck: + Description: Use node['platform_version'].to_i instead of node['platform_version'].split('.').first or node['platform_version'].split('.')[0] + Enabled: true + VersionAdded: '5.8.0' + Exclude: + - '**/metadata.rb' + ############################### # ChefCorrectness: Avoiding potential problems ############################### ChefCorrectness/ServiceResource: @@ -206,10 +213,32 @@ Enabled: true VersionAdded: '5.4.0' Exclude: - '**/metadata.rb' +ChefCorrectness/UnnecessaryNameProperty: + Description: There is no need to define a property named :name in a resource as Chef Infra defines that property for all resources out of the box. + Enabled: true + VersionAdded: '5.8.0' + Include: + - '**/resources/*.rb' + - '**/libraries/*.rb' + +ChefCorrectness/EmptyMetadataField: + Description: metadata.rb should not include fields with an empty string. Either don't include the field or add a value. + Enabled: true + VersionAdded: '5.8.0' + Include: + - '**/metadata.rb' + +ChefCorrectness/InvalidVersionMetadata: + Description: Cookbook metadata.rb version field should follow X.Y.Z version format. + Enabled: true + VersionAdded: '5.8.0' + Include: + - '**/metadata.rb' + ############################### # ChefDeprecations: Resolving Deprecations that block upgrading Chef Infra Client ############################### ChefDeprecations/NodeSet: @@ -453,9 +482,23 @@ Enabled: true VersionAdded: '5.7.0' Include: - '**/libraries/*.rb' - '**/resources/*.rb' + +ChefDeprecations/ChefSpecCoverageReport: + Description: Don't use the deprecated ChefSpec coverage report functionality in your specs. + Enabled: true + VersionAdded: '5.8.0' + Include: + - '**/spec/*.rb' + +ChefDeprecations/ChefSpecLegacyRunner: + Description: Use ChefSpec::SoloRunner or ChefSpec::ServerRunner instead of the deprecated ChefSpec::Runner. + Enabled: true + VersionAdded: '5.8.0' + Include: + - '**/spec/*.rb' ############################### # ChefModernize: Cleaning up legacy code and using new built-in resources ###############################