Skip to content

Commit

Permalink
Update cops
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Aug 12, 2023
1 parent 98d955e commit 82193ed
Showing 1 changed file with 83 additions and 7 deletions.
90 changes: 83 additions & 7 deletions .cookstyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AllCops:
# new cops and make upgrades easier (ie not dealing with a bunch of noise
# each Cookstyle update)
DisabledByDefault: true
TargetChefVersion: 14.15.6
TargetChefVersion: 16.18.0

Chef/Correctness/BlockGuardWithOnlyString:
Enabled: true
Expand All @@ -19,6 +19,8 @@ Chef/Correctness/DnfPackageAllowDowngrades:
Enabled: true
Chef/Correctness/IncorrectLibraryInjection:
Enabled: true
Chef/Correctness/InvalidCookbookName:
Enabled: true
Chef/Correctness/InvalidDefaultAction:
Enabled: true
Chef/Correctness/InvalidNotificationTiming:
Expand All @@ -43,8 +45,12 @@ Chef/Correctness/MacosUserdefaultsInvalidType:
Enabled: true
Chef/Correctness/MalformedPlatformValueForPlatformHelper:
Enabled: true
Chef/Correctness/MetadataMalformedDepends:
Enabled: true
Chef/Correctness/MetadataMissingName:
Enabled: true
Chef/Correctness/MetadataMissingVersion:
Enabled: true
Chef/Correctness/NodeNormal:
Enabled: true
Chef/Correctness/NodeNormalUnless:
Expand All @@ -55,6 +61,8 @@ Chef/Correctness/OctalModeAsString:
Enabled: true
Chef/Correctness/OpenSSLPasswordHelpers:
Enabled: true
Chef/Correctness/PowershellFileExists:
Enabled: true
Chef/Correctness/PowershellScriptDeleteFile:
Enabled: true
Chef/Correctness/ResourceSetsInternalProperties:
Expand Down Expand Up @@ -86,6 +94,8 @@ Chef/Deprecations/ChefSpecCoverageReport:
Enabled: true
Chef/Deprecations/ChefSpecLegacyRunner:
Enabled: true
Chef/Deprecations/ChefSugarHelpers:
Enabled: true
Chef/Deprecations/ChefWindowsPlatformHelper:
Enabled: true
Chef/Deprecations/Cheffile:
Expand All @@ -100,10 +110,18 @@ Chef/Deprecations/CookbookDependsOnPoise:
Enabled: true
Chef/Deprecations/CookbooksDependsOnSelf:
Enabled: true
Chef/Deprecations/DependsOnChefNginxCookbook:
Enabled: true
Chef/Deprecations/DependsOnChefReportingCookbook:
Enabled: true
Chef/Deprecations/DependsOnOmnibusUpdaterCookbook:
Enabled: true
Chef/Deprecations/DeprecatedPlatformMethods:
Enabled: true
Chef/Deprecations/DeprecatedShelloutMethods:
Enabled: true
Chef/Deprecations/DeprecatedSudoActions:
Enabled: true
Chef/Deprecations/DeprecatedWindowsVersionCheck:
Enabled: true
Chef/Deprecations/DeprecatedYumRepositoryProperties:
Expand All @@ -120,8 +138,12 @@ Chef/Deprecations/ExecutePathProperty:
Enabled: true
Chef/Deprecations/ExecuteRelativeCreatesWithoutCwd:
Enabled: true
Chef/Deprecations/FoodcriticFile:
Enabled: true
Chef/Deprecations/HWRPWithoutProvides:
Enabled: true
Chef/Deprecations/HWRPWithoutUnifiedTrue:
Enabled: true
Chef/Deprecations/IncludingXMLRubyRecipe:
Enabled: true
Chef/Deprecations/IncludingYumDNFCompatRecipe:
Expand All @@ -137,7 +159,7 @@ Chef/Deprecations/LibrarianChefSpec:
Chef/Deprecations/LocaleDeprecatedLcAllProperty:
Enabled: true
Chef/Deprecations/LogResourceNotifications:
Enabled: true
Enabled: false # TODO(T158851402) ratchet back in
Chef/Deprecations/MacosUserdefaultsGlobalProperty:
Enabled: true
Chef/Deprecations/NamePropertyWithDefaultValue:
Expand All @@ -156,6 +178,8 @@ Chef/Deprecations/PartialSearchHelperUsage:
Enabled: true
Chef/Deprecations/PoiseArchiveUsage:
Enabled: true
Chef/Deprecations/PolicyfileCommunitySource:
Enabled: true
Chef/Deprecations/PowershellCookbookHelpers:
Enabled: true
Chef/Deprecations/RequireRecipe:
Expand Down Expand Up @@ -201,6 +225,27 @@ Chef/Deprecations/WindowsTaskChangeAction:
Chef/Deprecations/WindowsVersionHelpers:
Enabled: true

# These cookbooks don't follow the Effortless Pattern
# See https://docs.chef.io/effortless/
Chef/Effortless/Berksfile:
Enabled: false
Chef/Effortless/ChefVaultUsed:
Enabled: false
Chef/Effortless/CookbookUsesDatabags:
Enabled: false
Chef/Effortless/CookbookUsesEnvironments:
Enabled: false
Chef/Effortless/CookbookUsesPolicygroups:
Enabled: false
Chef/Effortless/CookbookUsesRoles:
Enabled: false
Chef/Effortless/CookbookUsesSearch:
Enabled: false
Chef/Effortless/DependsChefVault:
Enabled: false
Chef/Effortless/SearchForEnvironmentsOrRoles:
Enabled: false

Chef/Modernize/ActionMethodInResource:
Enabled: true
Chef/Modernize/AllowedActionsFromInitialize:
Expand All @@ -217,10 +262,26 @@ Chef/Modernize/CustomResourceWithAttributes:
Enabled: true
Chef/Modernize/DatabagHelpers:
Enabled: true
Chef/Modernize/DeclareActionClass:
Enabled: true
Chef/Modernize/DefaultActionFromInitialize:
Enabled: true
Chef/Modernize/Definitions:
Enabled: true
Chef/Modernize/DependsOnChefVaultCookbook:
Enabled: true
Chef/Modernize/DependsOnChocolateyCookbooks:
Enabled: true
Chef/Modernize/DependsOnKernelModuleCookbook:
Enabled: true
Chef/Modernize/DependsOnLocaleCookbook:
Enabled: true
Chef/Modernize/DependsOnOpensslCookbook:
Enabled: true
Chef/Modernize/DependsOnTimezoneLwrpCookbook:
Enabled: true
Chef/Modernize/DependsOnWindowsFirewallCookbook:
Enabled: true
Chef/Modernize/DependsOnZypperCookbook:
Enabled: true
Chef/Modernize/DslIncludeInResource:
Expand Down Expand Up @@ -295,10 +356,16 @@ Chef/Modernize/SysctlParamResource:
Enabled: true
Chef/Modernize/UnnecessaryDependsChef14:
Enabled: true
Chef/Modernize/UnnecessaryDependsChef15:
Enabled: true
Chef/Modernize/UnnecessaryMixlibShelloutRequire:
Enabled: true
Chef/Modernize/UseBuildEssentialResource:
Enabled: true
Chef/Modernize/UseChefLanguageEnvHelpers:
Enabled: true
Chef/Modernize/UseChefLanguageSystemdHelper:
Enabled: true
Chef/Modernize/UseMultipackageInstalls:
Enabled: true
Chef/Modernize/UseRequireRelative:
Expand Down Expand Up @@ -361,25 +428,34 @@ Chef/RedundantCode/UnnecessaryNameProperty:
Chef/RedundantCode/UseCreateIfMissing:
Enabled: true

Chef/Security/SshPrivateKey:
Enabled: true

Chef/Sharing/DefaultMetadataMaintainer:
Enabled: true
Chef/Sharing/EmptyMetadataField:
Enabled: true
Chef/Sharing/IncludePropertyDescriptions:
Enabled: true
Enabled: false # TODO(T158836638) ratchet back in
Chef/Sharing/IncludeResourceDescriptions:
Enabled: true
Enabled: false # TODO(T158836638) ratchet back in
Chef/Sharing/IncludeResourceExamples:
Enabled: true
Enabled: false # TODO(T158836638) ratchet back in
Chef/Sharing/InsecureCookbookURL:
Enabled: true
Chef/Sharing/InvalidLicenseString:
Enabled: true

Chef/Style/AttributeKeys:
Enabled: true
# Chef/Style/CommentSentenceSpacing:
# Enabled: true
Chef/Style/ChefWhaaat:
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/CommentFormat:
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/CommentSentenceSpacing:
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/CopyrightCommentFormat:
Enabled: false # Turned off intentionally, too opinionated/noisy
Chef/Style/DefaultCopyrightComments:
Enabled: true
Chef/Style/FileMode:
Expand Down

0 comments on commit 82193ed

Please sign in to comment.