PropertyWithNameAttribute
The department is: PropertyWithNameAttribute
The full name of the cop is: Chef/Modernize/PropertyWithNameAttribute
Enabled by default | Supports autocorrection | Target Chef Version |
---|---|---|
Enabled | Yes | All Versions |
When using properties in a custom resource you should use name_property not the legacy name_attribute from the days of attributes
Examples
incorrect
property :bob, String, name_attribute: true
correct
property :bob, String, name_property: true
Configurable attributes
Name | Default value | Configurable values |
---|---|---|
Version Added | 5.1.0 | String |
Include |
| Array |