CodeCharta shows red before the limit (0.16.0) #29

Merged
mi merged 2 commits from mihoe/codecharta-red-from into main 2026-10-03 14:35:16 +02:00
Owner

Related Links

The Problem

The link of the report page set red to start at maxMutationCrap, the gate's limit.
A class at 9.3 was yellow, although it is the next one to look at; the build fails only when it passes 10.
Red at the limit itself was even inexact: in CodeCharta's absolute mode red starts at colorTo inclusive, while the gate fails only above the limit.

The Scenarios

  • @MC-CC-029 (changed) the link shows red from 90 % of the limit, yellow from its half: colorFrom=5&colorTo=9 for 10, and without a limit.
  • @MC-CC-030 (new) codeCharta.colorRedFrom sets where red starts; above the limit the export fails.

Both carry a one-line reason, … damit …, the form for new scenarios from now on.

Verified by

The Solution

  • CodeCityPage.colorRange takes the limit and an optional start of red: by default 90 % of the limit; yellow from half the limit, but never after red starts.
  • codeCharta { colorRedFrom } in the DSL; the export task checks it before it writes anything and fails with a message above the limit.
  • Version 0.16.0: a new DSL key.

🤖 Generated with Claude Code

## Related Links - [ADR 0007](../adr/0007-codecharta-export.md), [PR#23](2026-10-02-PR%2323-codecharta-color-range.md) ## The Problem The link of the report page set red to start at `maxMutationCrap`, the gate's limit. A class at 9.3 was yellow, although it is the next one to look at; the build fails only when it passes 10. Red at the limit itself was even inexact: in CodeCharta's absolute mode red starts at `colorTo` inclusive, while the gate fails only above the limit. ## The Scenarios - `@MC-CC-029` (changed) the link shows red from 90 % of the limit, yellow from its half: `colorFrom=5&colorTo=9` for 10, and without a limit. - `@MC-CC-030` (new) `codeCharta.colorRedFrom` sets where red starts; above the limit the export fails. Both carry a one-line reason, `… damit …`, the form for new scenarios from now on. ##### Verified by - [CodeCityPageTest](../../werkcrappit-pit/src/test/java/de/javagil/werkcrappit/pit/codecharta/CodeCityPageTest.java) - [CodeChartaFunctionalTest](../../werkcrappit-gradle-plugin/src/functionalTest/java/de/javagil/werkcrappit/gradle/CodeChartaFunctionalTest.java) `aRealBuildWritesAValidCity`, `whereRedStartsIsConfigurable` ## The Solution - `CodeCityPage.colorRange` takes the limit and an optional start of red: by default 90 % of the limit; yellow from half the limit, but never after red starts. - `codeCharta { colorRedFrom }` in the DSL; the export task checks it before it writes anything and fails with a message above the limit. - Version 0.16.0: a new DSL key. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi added 1 commit 2026-10-03 13:51:04 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi added 1 commit 2026-10-03 14:13:48 +02:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi merged commit 22a57a02e2 into main 2026-10-03 14:35:16 +02:00
mi deleted branch mihoe/codecharta-red-from 2026-10-03 14:35:16 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkcrappit#29