class AdLint::Exam::CBuiltin::W0054
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 156 def initialize(phase_ctxt) super trav = phase_ctxt[:cpp_ast_traversal] trav.enter_if_section += T(:enter_if_section) trav.leave_if_section += T(:leave_if_section) @if_depth = 0 end
Private Instance Methods
enter_if_section(node)
click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 165 def enter_if_section(node) @if_depth += 1 W(node.location) if @if_depth == 9 end
leave_if_section(*)
click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 170 def leave_if_section(*) @if_depth -= 1 end