Class: RuboCop::Cop::Chef::Deprecations::WindowsFeatureServermanagercmd
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Chef::Deprecations::WindowsFeatureServermanagercmd
- Includes:
- RuboCop::Chef::CookbookHelpers
- Defined in:
- lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb
Overview
The ‘windows_feature` resource no longer supports setting the `install_method` to `:servermanagercmd`. `:windows_feature_dism` or `:windows_feature_powershell` should be used instead.
Constant Summary collapse
- MSG =
'The `windows_feature` resource no longer supports setting the `install_method` to `:servermanagercmd`. `:windows_feature_dism` or `:windows_feature_powershell` should be used instead.'
Instance Method Summary collapse
Methods included from RuboCop::Chef::CookbookHelpers
#match_property_in_resource?, #match_resource_type?, #method_arg_ast_to_string, #resource_block_name_if_string
Methods inherited from Base
Instance Method Details
#on_block(node) ⇒ Object
49 50 51 52 53 |
# File 'lib/rubocop/cop/chef/deprecation/windows_feature_servermanagercmd.rb', line 49 def on_block(node) match_property_in_resource?(:windows_feature, :install_method, node) do |prop_node| add_offense(prop_node, severity: :warning) if prop_node.source.include?(':servermanagercmd') end end |