class AdLint::Exam::CBuiltin::W0061
Public Class Methods
new(phase_ctxt)
click to toggle source
Calls superclass method
AdLint::Examination::new
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 310 def initialize(phase_ctxt) super phase_ctxt[:cc1_source].on_language_extension += M(:check) end
Private Instance Methods
check(matched_toks)
click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 316 def check(matched_toks) head_loc = matched_toks.first.location if head_loc.in_analysis_target?(traits) W(head_loc, tokens_to_str(matched_toks)) end end
tokens_to_str(toks)
click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 323 def tokens_to_str(toks) toks.map { |tok| tok.type == :NEW_LINE ? nil : tok.value }.compact.join(" ") end