This weeks Cookstyle is out with 4 new Chef Infa Cops as well as few nice fixes.
4 New Cops
ChefModernize/NodeInitPackage cop detects cookbooks that detect the
systemd init system by parsing the content of
/proc/1/comm. Chef Infra Client 12.0 and later include a
node['init_package'] attribute, which should be used instead.
ChefDeprecations/WindowsFeatureServermanagercmd cop detects
windows_feature resources that set the
install_method property to
:servermanagercmd. The windows_feature resource no longer supports the legacy
Server Manager command in Windows. Use
ChefModernize/WindowsRegistryUAC resource detects the usage of the
registry_key resource to set values in the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System key in order to control UAC behavior in Windows. Chef Infra Client 15.0+ ships with a windows_uac resource that should be used instead.
ChefModernize/UseRequireRelative cop detects cookbooks that use overly complex
require statements with
__FILE__. These can be simplified by using
Other fixes and changes
ChefStyle/TrueClassFalseClassResourcePropertiesto no longer detect
FalseClassin resource attributes where these are required.
ChefModernize/ExecuteAptUpdateto detect additional execute resources running
apt-get updateas well as resources notifying one of these execute resources.
- Disabled RuboCop's
Naming/VariableNamecops since these can't be autocorrected and don't impact Chef Infra Client.