Class: RuboCop::Cop::Elegant::NoComments
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Elegant::NoComments
- 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
-
#on_new_investigation ⇒ Object
rubocop:disable Elegant/GoodMethodName.
Instance Method Details
#on_new_investigation ⇒ Object
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 |