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
Instance Method Details
#on_new_investigation ⇒ Object
15 16 17 18 19 |
# File 'lib/rubocop/cop/elegant/no_comments.rb', line 15 def on_new_investigation processed_source.comments.each do |comment| register(comment) unless allowed?(comment) end end |