Cookstyle Cops List
Chef/Correctness
These cops detect incorrect cookbook code.
- BlockGuardWithOnlyString
- ChefApplicationFatal
- ConditionalRubyShellout
- CookbookUsesNodeSave
- DnfPackageAllowDowngrades
- IncorrectLibraryInjection
- InvalidCookbookName
- InvalidDefaultAction
- InvalidNotificationResource
- InvalidNotificationTiming
- InvalidPlatformFamilyHelper
- InvalidPlatformFamilyInCase
- InvalidPlatformHelper
- InvalidPlatformInCase
- InvalidPlatformMetadata
- InvalidPlatformValueForPlatformFamilyHelper
- InvalidPlatformValueForPlatformHelper
- InvalidVersionMetadata
- LazyEvalNodeAttributeDefaults
- LazyInResourceGuard
- MacosUserdefaultsInvalidType
- MalformedPlatformValueForPlatformHelper
- MetadataMalformedDepends
- MetadataMissingName
- MetadataMissingVersion
- NodeNormal
- NodeNormalUnless
- NotifiesActionNotSymbol
- OctalModeAsString
- OpenSSLPasswordHelpers
- PowershellFileExists
- PowershellScriptDeleteFile
- PropertyWithoutType
- ResourceSetsInternalProperties
- ResourceSetsNameProperty
- ResourceWithNoneAction
- ScopedFileExist
- ServiceResource
- SupportsMustBeFloat
- TmpPath
Chef/Deprecations
These cops check for deprecations that might block upgrading Chef Infra Client.
- ChefDKGenerators
- Cheffile
- ChefHandlerRecipe
- ChefHandlerUsesSupports
- ChefRewind
- ChefShellout
- ChefSpecCoverageReport
- ChefSpecLegacyRunner
- ChefSugarHelpers
- ChefWindowsPlatformHelper
- ChocolateyPackageUninstallAction
- CookbookDependsOnCompatResource
- CookbookDependsOnPartialSearch
- CookbookDependsOnPoise
- CookbooksDependsOnSelf
- Delivery
- DependsOnChefNginxCookbook
- DependsOnChefReportingCookbook
- DependsOnOmnibusUpdaterCookbook
- DeprecatedChefSpecPlatform
- DeprecatedPlatformMethods
- DeprecatedShelloutMethods
- DeprecatedSudoActions
- DeprecatedWindowsVersionCheck
- DeprecatedYumRepositoryActions
- DeprecatedYumRepositoryProperties
- EasyInstallResource
- EOLAuditModeUsage
- EpicFail
- ErlCallResource
- ExecutePathProperty
- ExecuteRelativeCreatesWithoutCwd
- FoodcriticFile
- FoodcriticTesting
- HWRPWithoutProvides
- HWRPWithoutUnifiedTrue
- IncludingXMLRubyRecipe
- IncludingYumDNFCompatRecipe
- LaunchdDeprecatedHashProperty
- LegacyNotifySyntax
- LegacyYumCookbookRecipes
- LibrarianChefSpec
- LocaleDeprecatedLcAllProperty
- LogResourceNotifications
- MacosUserdefaultsGlobalProperty
- NamePropertyWithDefaultValue
- NodeDeepFetch
- NodeMethodsInsteadofAttributes
- NodeSet
- NodeSetUnless
- NodeSetWithoutLevel
- PartialSearchClassUsage
- PartialSearchHelperUsage
- PoiseArchiveUsage
- PolicyfileCommunitySource
- PowershellCookbookHelpers
- RequireRecipe
- ResourceInheritsFromCompatResource
- ResourceOverridesProvidesMethod
- ResourceUsesDslNameMethod
- ResourceUsesOnlyResourceName
- ResourceUsesProviderBaseMethod
- ResourceUsesUpdatedMethod
- ResourceWithoutUnifiedTrue
- Ruby27KeywordArgumentWarnings
- RubyBlockCreateAction
- SearchUsesPositionalParameters
- UseAutomaticResourceName
- UseInlineResourcesDefined
- UserDeprecatedSupportsProperty
- UsesChefRESTHelpers
- UsesDeprecatedMixins
- UsesRunCommandHelper
- UseYamlDump
- VerifyPropertyUsesFileExpansion
- WindowsFeatureServermanagercmd
- WindowsPackageInstallerTypeString
- WindowsTaskChangeAction
- WindowsVersionHelpers
Chef/Effortless
These cops detects cookbook code that must be corrected before moving to the effortless pattern.
- Berksfile
- ChefVaultUsed
- CookbookUsesDatabags
- CookbookUsesEnvironments
- CookbookUsesPolicygroups
- CookbookUsesRoles
- CookbookUsesSearch
- DependsChefVault
- SearchForEnvironmentsOrRoles
Chef/Modernize
These cops detect cookbooks that could be simplified and modernized.
- ActionMethodInResource
- AllowedActionsFromInitialize
- ChefGemNokogiri
- ClassEvalActionClass
- ConditionalUsingTest
- CronDFileOrTemplate
- CronManageResource
- CustomResourceWithAttributes
- DatabagHelpers
- DeclareActionClass
- DefaultActionFromInitialize
- DefinesChefSpecMatchers
- Definitions
- DependsOnChefVaultCookbook
- DependsOnChocolateyCookbooks
- DependsOnKernelModuleCookbook
- DependsOnLocaleCookbook
- DependsOnOpensslCookbook
- DependsOnTimezoneLwrpCookbook
- DependsOnWindowsFirewallCookbook
- DependsOnZypperCookbook
- DslIncludeInResource
- EmptyResourceInitializeMethod
- ExecuteAptUpdate
- ExecuteScExe
- ExecuteSleep
- ExecuteSysctl
- ExecuteTzUtil
- FoodcriticComments
- IfProvidesDefaultAction
- IncludingAptDefaultRecipe
- IncludingMixinShelloutInResources
- IncludingOhaiDefaultRecipe
- IncludingWindowsDefaultRecipe
- LegacyBerksfileSource
- LibarchiveFileResource
- MacOsXUserdefaults
- MinitestHandlerUsage
- NodeInitPackage
- NodeRolesInclude
- OpensslRsaKeyResource
- OpensslX509Resource
- OsxConfigProfileResource
- PowerShellGuardInterpreter
- PowershellInstallPackage
- PowershellInstallWindowsFeature
- PowershellScriptExpandArchive
- PropertyWithNameAttribute
- ProvidesFromInitialize
- ResourceForcingCompileTime
- ResourceNameFromInitialize
- RespondToCompileTime
- RespondToInMetadata
- RespondToProvides
- RespondToResourceName
- SetOrReturnInResources
- SevenZipArchiveResource
- ShellOutHelper
- ShellOutToChocolatey
- SimplifyAptPpaSetup
- SysctlParamResource
- UnnecessaryDependsChef14
- UnnecessaryDependsChef15
- UnnecessaryMixlibShelloutRequire
- UseBuildEssentialResource
- UseChefLanguageCloudHelpers
- UseChefLanguageEnvHelpers
- UseChefLanguageSystemdHelper
- UseMultipackageInstalls
- UseRequireRelative
- UsesZypperRepo
- WhyRunSupportedTrue
- WindowsRegistryUAC
- WindowsScResource
- WindowsZipfileUsage
- ZipfileResource
Chef/RedundantCode
These cops detect redundant cookbook code.
- AptRepositoryDistributionDefault
- AptRepositoryNotifiesAptUpdate
- AttributeMetadata
- ConflictsMetadata
- CustomResourceWithAllowedActions
- DoubleCompileTime
- GroupingMetadata
- LongDescriptionMetadata
- MultiplePlatformChecks
- NamePropertyIsRequired
- OhaiAttributeToString
- PropertySplatRegex
- PropertyWithRequiredAndDefault
- ProvidesMetadata
- RecipeMetadata
- ReplacesMetadata
- ResourceWithNothingAction
- SensitivePropertyInResource
- StringPropertyWithNilDefault
- SuggestsMetadata
- UnnecessaryDesiredState
- UnnecessaryNameProperty
- UseCreateIfMissing
Chef/Ruby
Chef/Security
These cops detect potential security issues in your cookbook code.
Chef/Sharing
These cops detect issues that prevent sharing cookbooks with other teams or with the Chef community.
- DefaultMetadataMaintainer
- EmptyMetadataField
- IncludePropertyDescriptions
- IncludeResourceDescriptions
- IncludeResourceExamples
- InsecureCookbookURL
- InvalidLicenseString
Chef/Style
These cops check for stylistic problems in your cookbook code.
- AttributeKeys
- ChefWhaaat
- CommentFormat
- CommentSentenceSpacing
- CopyrightCommentFormat
- DefaultCopyrightComments
- FileMode
- ImmediateNotificationTiming
- IncludeRecipeWithParentheses
- NegatingOnlyIf
- OverlyComplexSupportsDependsMetadata
- SimplifyPlatformMajorVersionCheck
- TrueClassFalseClassResourceProperties
- UnnecessaryOSCheck
- UnnecessaryPlatformCaseStatement
- UsePlatformHelpers
InSpec/Deprecations
These cops detect deprecations in Chef InSpec code.