Class: Rubydex::Rules::DynamicAncestor

Inherits:
Rubydex::Rule show all
Defined in:
lib/rubydex/rules/dynamic_ancestor.rb

Overview

Dynamic ancestor references cannot be reasoned about statically because they depend on runtime values. The program may still be valid, but the quality of the analysis degrades. In the case of ancestors, since they influence constant resolution, the degradation may be more impactful than other dynamic references.

class Foo < var
            ^^^ Dynamic ancestor reference. This might be correct, but it cannot be understood by the analysis.
  include SomeClass.method_call
          ^^^^^^^^^^^^^^^^^^^^^ Dynamic ancestor reference.
end

Class Method Summary collapse

Methods inherited from Rubydex::Rule

rule_name, severity

Class Method Details

.default_severityObject

: -> singleton(Severity::Base)



23
24
25
# File 'lib/rubydex/rules/dynamic_ancestor.rb', line 23

def default_severity
  Severity::Information
end