class AdLint::Cc1::ScanfFormat::CompleteConversionSpecifier
Public Instance Methods
acceptable?()
click to toggle source
DESCRIPTION¶ ↑
Checks whether types of arguments match this directive.
RETURN VALUE¶ ↑
Boolean – True if types of arguments match this directive.
# File lib/adlint/cc1/format.rb, line 2483 def acceptable? if @conversion_argument if argument_types argument_types.any? do |arg_type| @conversion_argument.type.convertible?(arg_type) end else true end else false end end
complete?()
click to toggle source
# File lib/adlint/cc1/format.rb, line 2508 def complete? true end
valid_length_modifier?()
click to toggle source
# File lib/adlint/cc1/format.rb, line 2512 def valid_length_modifier? if length_modifier.empty? true else suitable_length_modifiers.include?(length_modifier) end end
wellformed?()
click to toggle source
DESCRIPTION¶ ↑
Checks whether the format string of this directive is the ISO C99 compliant.
RETURN VALUE¶ ↑
Boolean – True if the format string is wellformed.
# File lib/adlint/cc1/format.rb, line 2503 def wellformed? valid_assignment_suppressing_character? && valid_field_width? && valid_length_modifier? && valid_conversion_specifier_character? end
Private Instance Methods
argument_types()
click to toggle source
# File lib/adlint/cc1/format.rb, line 2521 def argument_types if consume_arguments? subclass_responsibility else nil end end
suitable_length_modifiers()
click to toggle source
# File lib/adlint/cc1/format.rb, line 2529 def suitable_length_modifiers subclass_responsibility end