Class: AdLint::Postfilter::LineWiseAnnotation
- Inherits:
-
MessageControlAnnotation
- Object
- MessageControlAnnotation
- AdLint::Postfilter::LineWiseAnnotation
- Defined in:
- lib/adlint/postfilter/annotate.rb
Instance Attribute Summary
Attributes inherited from MessageControlAnnotation
Class Method Summary collapse
Instance Method Summary collapse
- #generate_suppressions ⇒ Object
-
#initialize(message_controller_str, fpath, line_no) ⇒ LineWiseAnnotation
constructor
A new instance of LineWiseAnnotation.
Constructor Details
#initialize(message_controller_str, fpath, line_no) ⇒ LineWiseAnnotation
Returns a new instance of LineWiseAnnotation.
72 73 74 75 |
# File 'lib/adlint/postfilter/annotate.rb', line 72 def initialize(, fpath, line_no) super() @fpath, @line_no = fpath, line_no end |
Class Method Details
.detect(str, fpath, line_no) ⇒ Object
68 69 70 |
# 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 |
Instance Method Details
#generate_suppressions ⇒ Object
78 79 80 81 82 83 |
# File 'lib/adlint/postfilter/annotate.rb', line 78 def generate_suppressions ..map do |mesg_ctrl| LineWiseSuppression.new(mesg_ctrl., @fpath, @line_no, mesg_ctrl.suppression_activation?) end end |