Class: RuboCop::Cop::Chef::Style::ChefWhaaat
- Inherits:
 - 
      RuboCop::Cop
      
        
- Object
 - RuboCop::Cop
 - RuboCop::Cop::Chef::Style::ChefWhaaat
 
 
- Defined in:
 - lib/rubocop/cop/chef/style/chef_whaaat.rb
 
Overview
Checks for comments that mention “Chef” without context. Do you mean Chef Infra or Chef Software?
Constant Summary collapse
- MSG =
 'Do you mean Chef (the company) or a Chef product (e.g. Chef Infra, Chef InSpec, etc)?'
Instance Method Summary collapse
Instance Method Details
#on_new_investigation ⇒ Object
      37 38 39 40 41 42 43 44  | 
    
      # File 'lib/rubocop/cop/chef/style/chef_whaaat.rb', line 37 def on_new_investigation return unless processed_source.ast processed_source.comments.each do |comment| next unless comment.text.match?(/Chef [a-z]/) # https://rubular.com/r/0YzfDAbwJrDHix add_offense(comment, severity: :refactor) end end  |