Class: RuboCop::Cop::YARD::TagTypeSyntax

Inherits:
Base
  • Object
show all
Includes:
RangeHelp, Helper
Defined in:
lib/rubocop/cop/yard/tag_type_syntax.rb

Overview

Examples:

tag type

# bad
# @param [Integer String]

# good
# @param [Integer, String]

Instance Method Summary collapse

Methods included from Helper

#build_docstring, #each_types_explainer, #extract_tag_types, #inline_comment?, #parse_type, #styled_string

Instance Method Details

#on_new_investigationObject



16
17
18
19
20
21
22
23
# File 'lib/rubocop/cop/yard/tag_type_syntax.rb', line 16

def on_new_investigation
  processed_source.comments.each do |comment|
    next if inline_comment?(comment)
    next unless include_yard_tag?(comment)

    check(comment)
  end
end