Class: RuboCop::Cop::Chef::Style::DefaultCopyrightComments
- Defined in:
- lib/rubocop/cop/chef/style/comments_default_copyright.rb
Overview
Checks for default copyright comments from the chef generator cookbook command
Constant Summary collapse
- MSG =
'Cookbook copyright comment headers should be updated for a real person or organization.'
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_new_investigation ⇒ Object
37 38 39 40 41 42 43 44 45 |
# 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, severity: :refactor) end end |