Module: ArchSpec::Rules

Defined in:
lib/archspec/rules/dependency_rules.rb,
lib/archspec/rules/cycle_rule.rb,
lib/archspec/rules/privacy_rule.rb,
lib/archspec/rules/concern_rules.rb,
lib/archspec/rules/zeitwerk_rule.rb,
lib/archspec/rules/protocol_rules.rb,
lib/archspec/rules/component_rules.rb

Overview

The checks ArchSpec runs. Each rule responds to id (its stable rule id, used in suppressions and the todo file) and evaluate(graph), which returns ArchSpec::Diagnostic objects. You normally add rules through the ArchSpec::DSL rather than instantiating these directly, but you can pass a custom object of the same shape to ArchSpec::DSL::Context#rule.

Defined Under Namespace

Modules: ProtocolEvidence Classes: AllowDependenciesRule, AllowedConsumersRule, CannotCallRule, CannotDefineMethodRule, CannotInstantiateAndInvokeRule, CannotReferenceConstantsRule, ConcernIndependenceRule, DependencyRule, ForbidDependenciesRule, MustBeEmptyRule, MustImplementOneOfRule, MustImplementRule, NoCyclesRule, PublicApiRule, ZeitwerkNamingRule