This cop checks that comment annotation keywords are written according to guidelines.
# File lib/rubocop/cop/style/comment_annotation.rb, line 13 def investigate(processed_source) processed_source.comments.each do |comment| margin, first_word, colon, space, note = split_comment(comment) next unless annotation?(comment) && !correct_annotation?(first_word, colon, space, note) start = comment.loc.expression.begin_pos + margin.length length = first_word.length + (colon || '').length range = Parser::Source::Range.new(processed_source.buffer, start, start + length) add_offense(nil, range) end end
Generated with the Darkfish Rdoc Generator 2.