class RuboCop::Cop::Chef::Modernize::FoodcriticComments
Remove legacy code comments that disable Foodcritic rules. These comments are no longer necessary if you’ve migrated from Foodcritic to Cookstyle
for cookbook linting.
@example
### incorrect # ~FC013
Constants
- MSG
Public Instance Methods
Source
# File lib/rubocop/cop/chef/modernize/foodcritic_comments.rb, line 34 def on_new_investigation processed_source.comments.each do |comment| next unless comment.text.match?(/#\s*~FC\d{3}.*/) add_offense(comment, severity: :refactor) do |corrector| corrector.remove(comment) end end end