Skip to main content

InvalidPlatformFamilyInCase

All Cookstyle Cops


The department is: Chef/Correctness

The full name of the cop is: Chef/Correctness/InvalidPlatformFamilyInCase


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll Versions

Use valid platform family values in case statements.

Examples

incorrect

case node['platform_family']
when 'redhat'
  puts "I'm on a RHEL-like system"
end

Configurable attributes

NameDefault valueConfigurable values
Version Added6.6.0String
Exclude
  • **/metadata.rb
  • **/Berksfile
Array

Was this page helpful?