Class: RuboCop::Cop::Elegant::NoComments

Inherits:
Base
  • Object
show all
Extended by:
AutoCorrector
Defined in:
lib/rubocop/cop/elegant/no_comments.rb

Constant Summary collapse

MSG =
'Comment is not allowed, unless it is SPDX, magic, or rubocop directive'

Instance Method Summary collapse

Instance Method Details

#on_new_investigationObject



14
15
16
17
18
# File 'lib/rubocop/cop/elegant/no_comments.rb', line 14

def on_new_investigation
  processed_source.comments.each do |comment|
    register(comment) unless allowed?(comment)
  end
end