Class: RuboCop::Cop::Chef::Deprecations::DeprecatedWindowsVersionCheck

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb

Overview

Don’t use the deprecated ‘older_than_win_2012_or_8?` helper. Windows versions before 2012 and 8 are now end of life and this helper will always return false.

Examples:


### incorrect
if older_than_win_2012_or_8?
  # do some legacy things
end

Constant Summary collapse

MSG =
"Don't use the deprecated older_than_win_2012_or_8? helper. Windows versions before 2012 and 8 are now end of life and this helper will always return false."
RESTRICT_ON_SEND =
[:older_than_win_2012_or_8?].freeze

Instance Method Summary collapse

Methods inherited from Base

#target_chef_version

Instance Method Details

#on_send(node) ⇒ Object



35
36
37
# File 'lib/rubocop/cop/chef/deprecation/deprecated_windows_version_check.rb', line 35

def on_send(node)
  add_offense(node, severity: :warning)
end