class AdLint::Postfilter::LineWiseAnnotation

Public Class Methods

detect(str, fpath, line_no) click to toggle source
# File lib/adlint/postfilter/annotate.rb, line 68
def self.detect(str, fpath, line_no)
  str =~ /(?:ADLINT:LINE:|ADLINT::)\[.*\]/ ? new($&, fpath, line_no) : nil
end

Private Class Methods

new(message_controller_str, fpath, line_no) click to toggle source
# File lib/adlint/postfilter/annotate.rb, line 72
def initialize(message_controller_str, fpath, line_no)
  super(message_controller_str)
  @fpath, @line_no = fpath, line_no
end
new(message_controller_str) click to toggle source
# File lib/adlint/postfilter/annotate.rb, line 39
def initialize(message_controller_str)
  @message_controller = MessageController.new(message_controller_str)
end

Public Instance Methods

generate_suppressions() click to toggle source
# File lib/adlint/postfilter/annotate.rb, line 78
def generate_suppressions
  message_controller.message_control_list.map do |mesg_ctrl|
    LineWiseSuppression.new(mesg_ctrl.message_id, @fpath, @line_no,
                            mesg_ctrl.suppression_activation?)
  end
end