Skip to content

feat(architecture): draw --forbid violations red - #49

Merged
inth3shadows merged 1 commit into
masterfrom
arch-draw-violations
Sep 27, 2026
Merged

inth3shadows merged 1 commit into
masterfrom
arch-draw-violations

Conversation

@inth3shadows

Copy link
Copy Markdown
Owner

Roadmap item 2: the diagram now shows where a --forbid rule breaks, not just stderr.

  • Violating edges get color="#dc2626", fontcolor="#dc2626", penwidth=1.8: the one loud color in the muted house style.
  • --group-depth: violatingDrawnKeys marks the directory edge a per-file violation rolls up into. A violation that rolls into a single group isn't drawn.
  • --max-render is not overridden to force a violating edge into the picture. hiddenViolationNote prints how many were left out; the run still exits 1.
  • With no violations the DOT is byte-identical to a run without --forbid (tested). --check ignores color, so committed diagrams are unaffected.

Real render: codegraph's own repo, full scan (4.0s), --group-depth 2 --max-render 12 --forbid 'src/mcp/->src/db/': exit 1, 3 violations listed, src/mcp/ → src/db/ drawn red.

Local: node test/run.js 195 passed, 0 failed (fork codegraph). Docs: README, USAGE, TECHNICAL.md.

A violating file edge is drawn red and thicker. Under --group-depth the
directory edge it rolls up into is marked. --max-render is not overridden
to force a violation into the picture; a stderr note counts the hidden
ones, and the run still exits 1. Without violations the DOT is
byte-identical to a run without --forbid.
@inth3shadows
inth3shadows merged commit 1c10e99 into master Sep 27, 2026
7 checks passed
@inth3shadows
inth3shadows deleted the arch-draw-violations branch September 27, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant