class ArchSpec::Rules::AllowDependenciesRule
Backs ArchSpec::DSL::ComponentProxy#can_use. Flags references from the source to any component outside its allowlist.
Public Instance Methods
Source
# File lib/archspec/rules/dependency_rules.rb, line 51 def evaluate(graph) relevant_edges(graph).flat_map do |edge| target_components(graph, edge).filter_map do |target| next if target == source || targets.include?(target) Diagnostic.new( rule: id, message: "#{source} may not depend on #{target}", location: edge.location, evidence: "#{edge.from_constant || edge.from_path} #{edge.type} #{edge_target(edge)}" ) end end end