Class: RuboCop::Cop::Sane::EmptyLineBeforeComment
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Sane::EmptyLineBeforeComment
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/sane/empty_line_before_comment.rb
Overview
Enforces an empty line before comments, except when the previous line is the start of a block, class, method, or another comment.
Constant Summary collapse
- MSG =
"Add empty line before comment."
Instance Method Summary collapse
Instance Method Details
#on_new_investigation ⇒ Object
42 43 44 45 46 |
# File 'lib/rubocop/cop/sane/empty_line_before_comment.rb', line 42 def on_new_investigation processed_source.comments.each do |comment| check_comment(comment) end end |