class AdLint::Exam::CBuiltin::W0576
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 1014 def initialize(phase_ctxt) super interp = phase_ctxt[:cpp_interpreter] interp.on_block_comment_found += M(:check) interp.on_line_comment_found += M(:check) @warned_chars = Set.new end
Private Instance Methods
check(comment, loc)
click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 1023 def check(comment, loc) if loc.in_analysis_target?(traits) not_adapted = Cpp::BasicSourceCharacterSet.select_not_adapted(comment) new_chars = not_adapted.to_set - @warned_chars unless new_chars.empty? W(loc, loc.fpath) @warned_chars.merge(new_chars) end end end