Class: RuboCop::Cop::Yardoc::SeparateTagsBlocks
- Inherits:
-
RuboCop::Cop::YardocBase
- Object
- Base
- RuboCop::Cop::YardocBase
- RuboCop::Cop::Yardoc::SeparateTagsBlocks
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/yardoc/separate_tags_blocks.rb
Overview
Ensures there are blank comment lines between blocks of tags in documentation comments.
Constant Summary collapse
- MSG =
'Add a blank comment line between different tag blocks.'- COMMENT_TEXT_RE =
Matches a comment line: captures the text after
#.#with only trailing whitespace is a "blank comment line". /\A#\s?(.*)\z/- TAG_RE =
Matches a YARD-style tag at the start of comment text.
/\A@(\w+)/
Instance Method Summary collapse
-
#on_def(node) ⇒ Object
(also: #on_defs)
Executed for each method definition.
Instance Method Details
#on_def(node) ⇒ Object Also known as: on_defs
Executed for each method definition
44 45 46 47 48 49 50 |
# File 'lib/rubocop/cop/yardoc/separate_tags_blocks.rb', line 44 def on_def(node) return unless documented? node doc_comment_groups(node).each do |group| check_group(group) end end |