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, rubocop directive, or docblock'

Instance Method Summary collapse

Instance Method Details

#on_new_investigationObject

rubocop:disable Elegant/GoodMethodName



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

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