Skip to main content

InvalidPlatformHelper

All Cookstyle Cops


The department is: Chef/Correctness

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


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

Pass valid platforms to the platform? helper.

Examples

incorrect

platform?('darwin')
platform?('rhel)
platform?('sles')

correct

platform?('mac_os_x')
platform?('redhat)
platform?('suse')

Configurable attributes

NameDefault valueConfigurable values
Version Added5.15.0String
Exclude
  • **/metadata.rb
  • **/Berksfile
Array

Was this page helpful?