70 lines
2.9 KiB
Markdown
70 lines
2.9 KiB
Markdown
# PR#14: A Shop That Shows Every Colour of werkcrappit's Charts
|
|
|
|
> **WARNING:** This document describes only the change applied in this PR.
|
|
> It may already be outdated once the next PR is merged.
|
|
> Historic PR documentation is not maintained along with new PRs; treat it as a snapshot.
|
|
|
|
## Related Links
|
|
|
|
- [werkcrappit](https://git.javagil.de/mi/werkcrappit): Mutation-CRAP, cohesion and coupling per JVM class and method,
|
|
with a code city, a structure page and a matrix.
|
|
|
|
## Problem
|
|
|
|
werkcrappit's charts need a demo: a public project whose code city, structure page and matrix show each colour once,
|
|
so that a reader sees what each colour means.
|
|
werkcrappit itself keeps its own code clean with ratchets, so its charts are almost all green;
|
|
Werkator is in Kotlin and changes every day; hsadmin-ng is Hostsharing-internal.
|
|
|
|
## Non-Goals
|
|
|
|
- No change of the container tests or of the probe programs.
|
|
- No gate in the nightly build: the demo is red on purpose.
|
|
|
|
## Specification
|
|
|
|
### Feature: the demo of werkcrappit's charts
|
|
|
|
#### Scenario#14.01: the demo needs no container engine
|
|
|
|
So that the demo also builds where neither docker nor werkdock runs.
|
|
|
|
- **Given** a machine without docker and without werkdock
|
|
- **When** a developer builds the demo
|
|
- **Then** the demo's charts are there
|
|
|
|
##### Verified by
|
|
|
|
- the nightly build `mutation`, which runs without `DOCKER_HOST`, unlike the default build
|
|
- the local run of 2026-10-11 without `DOCKER_HOST`
|
|
|
|
#### Scenario#14.02: the demo shows each colour
|
|
|
|
So that a reader of werkcrappit sees what each colour means.
|
|
|
|
- **Given** the shop
|
|
- **When** a reader opens its charts
|
|
- **Then** each colour the README lists appears where the README says
|
|
|
|
##### Verified by
|
|
|
|
- the local run of 2026-10-11: Mutation-CRAP 4, 6, 13.4 and 42; LCOM4 2 and 3; change risk 168;
|
|
the class cycle `Order` and `Invoice`; the package cycles `persistence` and `service` across, `web` and `forms` along
|
|
|
|
## Solution
|
|
|
|
- `werkprobe.shop` holds 13 classes, besides its `package-info`, in `domain`, `service`, `persistence`, `web` and `web.forms`,
|
|
after the fixture of werkcrappit's structure page, with unit tests of their own.
|
|
- `build.gradle` applies `info.solidsoft.pitest` 1.19.0 and `de.javagil.werkcrappit` 0.26.0 in the Groovy DSL;
|
|
PIT 1.30.0 mutates `werkprobe.shop.*` and runs only its tests.
|
|
`maxMutationCrap = 10` sets the colours, red from 9 and yellow from 4.5;
|
|
source links lead to the analysed commit on git.javagil.de.
|
|
- `settings.gradle` and `build.gradle` add the Maven registry of git.javagil.de, where werkcrappit is published,
|
|
each limited to the group `de.javagil.werkcrappit`.
|
|
- `.werkator.yml` gets the nightly build `mutation` at 04:00, after Werkator's and werkcrappit's, without a gate.
|
|
- The README lists what shows each colour; `AGENTS.md` says the flaws are on purpose.
|
|
|
|
## Follow-up PRs
|
|
|
|
- werkcrappit links the latest code city of this build as its demo.
|