Hey folks,
Just in time for your Chef Infra Client 16.3 upgrades we have a new release of Cookstyle out with 2 new cops to cleanup macos_userdefaults usage.
ChefCorrectness/MacosUserdefaultsInvalidType
The macos_userdefaults resource prior to Chef Infra Client 16.3 would silently continue if invalid types were passed resulting in unexpected behavior. Valid values are array, bool, dict, float, int, and string. The ChefCorrectness/MacosUserdefaultsInvalidType will detect invalid types and autocorrect several common mistakes such as using integer instead of int.
Enabled by default: True
Autocorrects: Yes
ChefDeprecations/MacosUserdefaultsGlobalProperty
The ChefDeprecations/MacosUserdefaultsGlobalProperty cop detects the usage of the global property in the macos_userdefaults resource which was deprecated in Chef Infra Client 16.3. You can now omit the domain property to set global default values instead.
Enabled by default: True
Autocorrects: Yes
Other Improvements
-
ChefCorrectness/InvalidPlatformFamilyHelperwill now autocorrect offenses. -
ChefEffortless/CookbookUsesEnvironmmentshas been renamedChefEffortless/CookbookUsesEnvironments. Sticky Macbook keyboards are not fun. -
ChefStyle/FileModenow detects thefiles_modeproperty inremote_directoryresources. - Many styleguide links have been fixed to properly point to the docs in the Cookstyle repo.
Enjoy,
Tim