config/cookstyle.yml in cookstyle-5.9.3 vs config/cookstyle.yml in cookstyle-5.10.11

- old
+ new

@@ -235,10 +235,24 @@ Enabled: true VersionAdded: '5.8.0' Include: - '**/metadata.rb' +ChefCorrectness/NotifiesActionNotSymbol: + Description: When notifying an action within a resource the action should always be a symbol. In Chef Infra Client releases before 14.0 this may result in double notification. + Enabled: true + VersionAdded: '5.10.0' + Include: + - '**/metadata.rb' + +ChefCorrectness/IncorrectLibraryInjection: + Description: Libraries should be injected into the Chef::DSL::Recipe or Chef::DSL::Resource classes and not Recipe/Resource/Provider classes directly. + Enabled: true + VersionAdded: '5.10.0' + Include: + - '**/metadata.rb' + ############################### # ChefDeprecations: Resolving Deprecations that block upgrading Chef Infra Client ############################### ChefDeprecations/NodeSet: @@ -512,10 +526,38 @@ Enabled: true VersionAdded: '5.9.0' Exclude: - '**/metadata.rb' +ChefDeprecations/DeprecatedYumRepositoryProperties: + Description: With the release of Chef Infra Client 12.14 and the yum cookbook 3.0 several properties in the yum_repository resource were renamed. url -> baseurl, keyurl -> gpgkey, and mirrorexpire -> mirror_expire. + Enabled: true + VersionAdded: '5.10.0' + Exclude: + - '**/metadata.rb' + +ChefDeprecations/EOLAuditModeUsage: + Description: The beta Audit Mode feature in Chef Infra Client was removed in Chef Infra Client 15.0. Users should instead use InSpec and the audit cookbook. See https://www.inspec.io/ for more informmation. + Enabled: true + VersionAdded: '5.10.0' + Exclude: + - '**/metadata.rb' + +ChefDeprecations/ResourceInheritsFromCompatResource: + Description: HWRP style resource should inherit from the 'Chef::Resource' class and not the 'ChefCompat::Resource' class from the deprecated compat_resource cookbook. + Enabled: true + VersionAdded: '5.10.0' + Include: + - '**/libraries/*.rb' + +ChefDeprecations/VerifyPropertyUsesFileExpansion: + Description: Use the 'path' variable in the verify property and not the 'file' variable which was removed in Chef Infra Client 13. + Enabled: true + VersionAdded: '5.10.0' + Exclude: + - '**/metadata.rb' + ############################### # ChefModernize: Cleaning up legacy code and using new built-in resources ############################### ChefModernize/LegacyBerksfileSource: @@ -578,15 +620,16 @@ VersionAdded: '5.2.0' Include: - '**/resources/*.rb' ChefModernize/CustomResourceWithAllowedActions: - Description: Custom Resources don't need to define the allowed actions with allowed_actions or actions methods + Description: Resources no longer need to define the allowed actions using the allowed_actions / actions helper methods or within an initialize method. Enabled: true VersionAdded: '5.2.0' Include: - '**/resources/*.rb' + - '**/libraries/*.rb' ChefModernize/IncludingAptDefaultRecipe: Description: Do not include the Apt default recipe to update package cache. Instead use the apt_update resource, which is built into Chef Infra Client 12.7 and later. Enabled: true VersionAdded: '5.3.0' @@ -760,10 +803,28 @@ Enabled: true VersionAdded: '5.9.0' Exclude: - '**/metadata.rb' +ChefModernize/DefaultActionFromInitialize: + Description: The default actions can now be specified using the `default_action` helper instead of using the @action variable in the resource provider initialize method. + Enabled: true + VersionAdded: '5.10.0' + Include: + - '**/resources/*.rb' + - '**/providers/*.rb' + - '**/libraries/*.rb' + +ChefModernize/ResourceNameFromInitialize: + Description: The name of a resource can be set with the "resource_name" helper instead of using the initialize method. + Enabled: true + VersionAdded: '5.10.0' + Include: + - '**/resources/*.rb' + - '**/providers/*.rb' + - '**/libraries/*.rb' + ############################### # Migrating to new patterns ############################### ChefEffortless/CookbookUsesSearch: @@ -773,9 +834,24 @@ ChefEffortless/CookbookUsesDatabags: Description: Cookbook uses data bags, which cannot be used in the Effortless Infra pattern Enabled: false VersionAdded: '5.1.0' + +ChefEffortless/CookbookUsesEnvironmments: + Description: Cookbook uses environments, which cannot be used in the Effortless Infra pattern + Enabled: false + VersionAdded: '5.10.0' + +ChefEffortless/CookbookUsesPolicygroups: + Description: Cookbook uses Policy Groups, which cannot be used in the Effortless Infra pattern + Enabled: false + VersionAdded: '5.10.0' + +ChefEffortless/CookbookUsesRoles: + Description: Cookbook uses Roles, which cannot be used in the Effortless Infra pattern + Enabled: false + VersionAdded: '5.10.0' #### The base rubocop 0.37 enabled.yml file we started with #### Layout/AccessModifierIndentation: Enabled: true