Since PR#36 the report measures cohesion and coupling per class, but the code city did not show them.
The Scenarios
@MC-CK-008 the city has the metrics lcom4 (relative: a package shows the median), efferent_coupling and afferent_coupling (absolute: a package shows the sum); a building without LCOM4 has no value, never 0.
@MC-CK-009 the report page opens the city coloured by Mutation-CRAP, by cohesion (1 green, 2 yellow, from 3 red) or by coupling (the viewer's own bounds, until step 3 brings a limit).
CodeChartaFunctionalTesttheMetricsComeFromTheReport: every class of a real build's report reaches its building
The Solution
ReportInput reads the section classes; CodeCity measures a building by its methods and, where known, its class's cohesion and coupling.
The report page builds three links from one layout, area=rloc&height=complexity, each with its colour.
werkcrappit-pit applies the Gradle plugin 0.18.0, whose gate reads schema version 2, which ends the failing nightly mutationCrapCheck since PR#36.
ReportInput.designs reads one class in design: at first one method, it exceeded werkcrappit's own limit of 9, which a round-trip test of report and reader and the split brought back.
Version 0.19.0.
Open Questions
werkcrappit's own city shows the new metrics only once its Gradle plugin is raised to 0.19.0: the export of its build runs on the released plugin.
## Related Links
- [RFC 0002](../rfcs/0002-cohesion-and-coupling.md), step 2; [PR#36](2026-10-04-PR%2336-cohesion-coupling-measured.md), step 1
## The Problem
Since PR#36 the report measures cohesion and coupling per class, but the code city did not show them.
## The Scenarios
- `@MC-CK-008` the city has the metrics `lcom4` (relative: a package shows the median), `efferent_coupling` and `afferent_coupling` (absolute: a package shows the sum); a building without LCOM4 has no value, never 0.
- `@MC-CK-009` the report page opens the city coloured by Mutation-CRAP, by cohesion (1 green, 2 yellow, from 3 red) or by coupling (the viewer's own bounds, until step 3 brings a limit).
##### Verified by
- [CodeCityTest](../../werkcrappit-pit/src/test/java/de/javagil/werkcrappit/pit/codecharta/CodeCityTest.java) `theCityShowsCohesionAndCoupling`
- [CodeCityPageTest](../../werkcrappit-pit/src/test/java/de/javagil/werkcrappit/pit/codecharta/CodeCityPageTest.java) `thePageOpensTheCityByCohesionOrCoupling`
- [CodeChartaFunctionalTest](../../werkcrappit-gradle-plugin/src/functionalTest/java/de/javagil/werkcrappit/gradle/CodeChartaFunctionalTest.java) `theMetricsComeFromTheReport`: every class of a real build's report reaches its building
## The Solution
- `ReportInput` reads the section `classes`; `CodeCity` measures a building by its methods and, where known, its class's cohesion and coupling.
- The report page builds three links from one layout, `area=rloc&height=complexity`, each with its colour.
- werkcrappit-pit applies the Gradle plugin 0.18.0, whose gate reads schema version 2, which ends the failing nightly `mutationCrapCheck` since PR#36.
- `ReportInput.designs` reads one class in `design`: at first one method, it exceeded werkcrappit's own limit of 9, which a round-trip test of report and reader and the split brought back.
- Version 0.19.0.
## Open Questions
- werkcrappit's own city shows the new metrics only once its Gradle plugin is raised to 0.19.0: the export of its build runs on the released plugin.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Related Links
The Problem
Since PR#36 the report measures cohesion and coupling per class, but the code city did not show them.
The Scenarios
@MC-CK-008the city has the metricslcom4(relative: a package shows the median),efferent_couplingandafferent_coupling(absolute: a package shows the sum); a building without LCOM4 has no value, never 0.@MC-CK-009the report page opens the city coloured by Mutation-CRAP, by cohesion (1 green, 2 yellow, from 3 red) or by coupling (the viewer's own bounds, until step 3 brings a limit).Verified by
theCityShowsCohesionAndCouplingthePageOpensTheCityByCohesionOrCouplingtheMetricsComeFromTheReport: every class of a real build's report reaches its buildingThe Solution
ReportInputreads the sectionclasses;CodeCitymeasures a building by its methods and, where known, its class's cohesion and coupling.area=rloc&height=complexity, each with its colour.mutationCrapChecksince PR#36.ReportInput.designsreads one class indesign: at first one method, it exceeded werkcrappit's own limit of 9, which a round-trip test of report and reader and the split brought back.Open Questions
🤖 Generated with Claude Code