lib/rubocop/cop/chef/sharing/invalid_license_string.rb in cookstyle-7.30.1 vs lib/rubocop/cop/chef/sharing/invalid_license_string.rb in cookstyle-7.30.3
- old
+ new
@@ -516,10 +516,10 @@
def_node_matcher :license?, '(send nil? :license $str ...)'
def on_send(node)
license?(node) do |license|
return if valid_license?(license.str_content)
- add_offense(license, message: MSG, severity: :refactor) do |corrector|
+ add_offense(license, severity: :refactor) do |corrector|
correct_string = autocorrect_license_string(license.str_content)
corrector.replace(license, "'#{correct_string}'") if correct_string
end
end
end