Class: AdLint::Examination
- Inherits:
-
Object
- Object
- AdLint::Examination
- Extended by:
- Forwardable
- Includes:
- LogUtil, ReportUtil
- Defined in:
- lib/adlint/exam.rb
Overview
DESCRIPTION
Base of all kinds of source code examinations.
Direct Known Subclasses
Defined Under Namespace
Modules: Passivation
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(phase_ctxt) ⇒ Examination
constructor
A new instance of Examination.
Methods included from LogUtil
#log_debug, #log_error, #log_fatal, #log_info, #log_warn
Methods included from ReportUtil
#create_context_message, #write_FL_FUNC, #write_FL_STMT, #write_FN_CALL, #write_FN_CSUB, #write_FN_CYCM, #write_FN_GOTO, #write_FN_LINE, #write_FN_NEST, #write_FN_PARA, #write_FN_PATH, #write_FN_RETN, #write_FN_STMT, #write_FN_UELS, #write_FN_UNRC, #write_FN_UNUV, #write_assignment, #write_error_message, #write_funcall, #write_fundcl, #write_fundef, #write_gvardcl, #write_include, #write_initialization, #write_labeldef, #write_literal, #write_macrodef, #write_pp_directive, #write_typedcl, #write_vardef, #write_warning_message, #write_xref_function, #write_xref_variable
Constructor Details
#initialize(phase_ctxt) ⇒ Examination
Returns a new instance of Examination.
80 81 82 |
# File 'lib/adlint/exam.rb', line 80 def initialize(phase_ctxt) @phase_ctxt = phase_ctxt end |
Class Method Details
.catalog ⇒ Object
58 59 60 |
# File 'lib/adlint/exam.rb', line 58 def catalog eval "::#{self.name.sub(/(.*::).*\z/, "\\1")}Catalog" end |
.registrant_phase_class ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/adlint/exam.rb', line 45 def registrant_phase_class self.ancestors.each do |klass| if phase_class = @@registrant_phase_classes[klass] return phase_class end end nil end |
.required?(phase_ctxt) ⇒ Boolean
54 55 56 |
# File 'lib/adlint/exam.rb', line 54 def required?(phase_ctxt) subclass_responsibility end |
Instance Method Details
#execute ⇒ Object
84 85 86 87 |
# File 'lib/adlint/exam.rb', line 84 def execute do_prepare(@phase_ctxt) do_execute(@phase_ctxt) end |