class RuboCop::Cop::Chef::Style::DefaultCopyrightComments
Checks for default copyright comments from the chef generator cookbook command
@example
#### incorrect Copyright:: 2019 YOUR_NAME Copyright:: 2019 YOUR_COMPANY_NAME #### correct Copyright:: 2019 Tim Smith Copyright:: 2019 Chef Software, Inc.
Constants
- MSG
Public Instance Methods
on_new_investigation()
click to toggle source
# File lib/rubocop/cop/chef/style/comments_default_copyright.rb, line 37 def on_new_investigation return unless processed_source.ast processed_source.comments.each do |comment| next unless comment.inline? && # headers aren't in blocks /# (?:Copyright\W*).*YOUR_(NAME|COMPANY_NAME)/.match?(comment.text) add_offense(comment, message: MSG, severity: :refactor) end end