Class: Railsmith::ArchChecks::Violation

Inherits:
Struct
  • Object
show all
Defined in:
lib/railsmith/arch_checks/violation.rb

Overview

A single architecture rule violation found by static analysis.

Instance Attribute Summary collapse

Instance Attribute Details

#fileObject (readonly)

Path to the source file containing the violation.



12
# File 'lib/railsmith/arch_checks/violation.rb', line 12

Violation = Struct.new(:rule, :file, :line, :message, :severity)

#lineObject (readonly)

1-based line number of the offending code.



12
# File 'lib/railsmith/arch_checks/violation.rb', line 12

Violation = Struct.new(:rule, :file, :line, :message, :severity)

#messageObject (readonly)

Human-readable description of the violation.



12
# File 'lib/railsmith/arch_checks/violation.rb', line 12

Violation = Struct.new(:rule, :file, :line, :message, :severity)

#ruleObject (readonly)

Symbol identifying the detector rule (e.g. :direct_model_access).



12
# File 'lib/railsmith/arch_checks/violation.rb', line 12

Violation = Struct.new(:rule, :file, :line, :message, :severity)

#severityObject (readonly)

:warn (default, non-blocking) or :error.



12
# File 'lib/railsmith/arch_checks/violation.rb', line 12

Violation = Struct.new(:rule, :file, :line, :message, :severity)