Skip to main content

Chef/Correctness/NodeNormal

Cookstyle cops page

The Cookstyle cops department: Chef/Correctness

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll Versions

Normal attributes are discouraged since their semantics differ importantly from the default and override levels. Their values persist in the node object even after all code referencing them has been deleted, unlike default and override.

Code should be updated to use default or override levels, but this will change attribute merging behavior so needs to be validated manually and force_default or force_override levels may need to be used in recipe code.

Examples

incorrect

node.normal['foo'] = true

correct

node.default['foo'] = true
node.override['foo'] = true
node.force_default['foo'] = true
node.force_override['foo'] = true

Configurable attributes

NameDefault valueConfigurable values
Version Added5.1.0String
Include
    Array

    Thank you for your feedback!

    ×