Class: AdLint::FileWiseMessageSuppressionSpecifier

Inherits:
MessageSuppressionSpecifier show all
Defined in:
lib/adlint/annot.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MessageSuppressionSpecifier

#message_suppression_specifier?

Methods inherited from Annotation

#message_suppression_specifier?

Constructor Details

#initialize(loc, trailer) ⇒ FileWiseMessageSuppressionSpecifier

Returns a new instance of FileWiseMessageSuppressionSpecifier.



110
111
112
# File 'lib/adlint/annot.rb', line 110

def initialize(loc, trailer)
  super(loc, parse_message_specifiers(trailer))
end

Class Method Details

.parse(str, loc) ⇒ Object



106
107
108
# File 'lib/adlint/annot.rb', line 106

def self.parse(str, loc)
  str =~ /ADLINT:SF(:.*)\z/m ? new(loc, $1) : nil
end

Instance Method Details

#create_suppressorObject



122
123
124
# File 'lib/adlint/annot.rb', line 122

def create_suppressor
  FileWiseMessageSuppressor.new(@message_ids, @location)
end

#file_wise?Boolean

Returns:

  • (Boolean)


114
115
116
# File 'lib/adlint/annot.rb', line 114

def file_wise?
  true
end

#line_wise?Boolean

Returns:

  • (Boolean)


118
119
120
# File 'lib/adlint/annot.rb', line 118

def line_wise?
  false
end