Skip to content
sarj/graph/self-dependency

Remove self-dependencies

Components do not declare dependencies on themselves.

error

Examples

FlaggedFails
component A --source-import--> component A
PassesClean
component A has no edge to itself

Why it matters

Self edges are invalid graph evidence and can hide resolver mistakes.

How detection works

A component declares a code dependency on its own component ID.

What is inspected

  • component IDs and declared code dependencies

How to fix it

Replace implementation coupling with an owned library or runtime contract.

  1. Remove the redundant self edge.

Verify

  • Run repo-lint again and confirm the rule passes.