Skip to main content

ChefWindowsPlatformHelper

All Cookstyle Cops


The department is: Chef/Deprecations

The full name of the cop is: Chef/Deprecations/ChefWindowsPlatformHelper


Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll Versions

Use platform?('windows') instead of the legacy Chef::Platform.windows? helper

Examples

incorrect

Chef::Platform.windows?

correct

platform?('windows')
platform_family?('windows')

Configurable attributes

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

Was this page helpful?









Search Results