Class: AdLint::Postfilter::TranslationUnitWideAnnotation
- Inherits:
-
MessageControlAnnotation
- Object
- MessageControlAnnotation
- AdLint::Postfilter::TranslationUnitWideAnnotation
- 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, composing_fpaths) ⇒ TranslationUnitWideAnnotation
constructor
A new instance of TranslationUnitWideAnnotation.
Constructor Details
#initialize(message_controller_str, composing_fpaths) ⇒ TranslationUnitWideAnnotation
Returns a new instance of TranslationUnitWideAnnotation.
51 52 53 54 |
# File 'lib/adlint/postfilter/annotate.rb', line 51 def initialize(, composing_fpaths) super() @composing_fpaths = composing_fpaths end |
Class Method Details
.detect(str, composing_fpaths) ⇒ Object
47 48 49 |
# File 'lib/adlint/postfilter/annotate.rb', line 47 def self.detect(str, composing_fpaths) str =~ /ADLINT:TUNIT:\[.*\]/ ? new($&, composing_fpaths) : nil end |
Instance Method Details
#generate_suppressions ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/adlint/postfilter/annotate.rb', line 57 def generate_suppressions ..map { |mesg_ctrl| @composing_fpaths.map do |fpath| FileWiseSuppression.new(mesg_ctrl., fpath, mesg_ctrl.suppression_activation?) end }.flatten end |