Rulebearing Playground Coverage Schemas GitHub

ADR-0030: The reporter decides whether the error count is the exit code, as in dependency-cruiser

Context

ADR-0008 says that dependency-cruiser exits with the number of error-severity violations and that every reporter shares one exit-code function. The first half is true only for some reporters. In dependency-cruiser 18.2.0 each reporter returns its own exitCode, and the command line exits with it (src/cli/index.mjs). err, err-long, null, teamcity and azure-devops return summary.error. json, csv, text, dot, markdown, mermaid, d2 and baseline return 0. depcruise-fmt --exit-code exits with the same reporter's code.

The design's first pipeline depends on this. rulebearing cruise ... --output-type json > .graph/cruise.json is one CI step, and rulebearing fmt --exit-code --output-type err .graph/cruise.json is the next. If the JSON step exits with the error count, the pipeline stops before the gate step runs and before any ratchet reads the file. Layer 5 made the difference visible on dependency-cruiser's own repository: both tools found the same 7 errors, and dependency-cruiser exited 0 where Rulebearing exited 7.

Decision

Consequences

Alternatives considered