Skip to content

Commit 5fd9757

Browse files
nanotaboadaclaude
andcommitted
chore(build): enforce JaCoCo 80% coverage thresholds (#268)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fec46ea commit 5fd9757

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

.claude/commands/pre-commit.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ Before running the checklist, run `git fetch origin`. If the current branch is b
33
Run the pre-commit checklist for this project:
44

55
1. Update `CHANGELOG.md` `[Unreleased]` section — add an entry under the appropriate subsection (Added / Changed / Fixed / Removed) describing the changes made, referencing the issue number.
6-
2. Run `./mvnw clean install` — must succeed with no compilation warnings and all tests passing.
7-
3. Remind me to open `target/site/jacoco/index.html` to verify coverage after the build completes.
8-
4. If Docker is running, run `docker compose build` — must succeed with no
6+
2. Run `./mvnw clean install` — must succeed with no compilation warnings, all tests passing, and the JaCoCo check reporting `All coverage checks have been met.` (80% instruction and branch coverage enforced by the build).
7+
3. If Docker is running, run `docker compose build` — must succeed with no
98
errors. Skip this step with a note if Docker Desktop is not running.
10-
5. If `coderabbit` CLI is installed, run `coderabbit review --type uncommitted --prompt-only`:
9+
4. If `coderabbit` CLI is installed, run `coderabbit review --type uncommitted --prompt-only`:
1110
- If actionable/serious findings are reported, stop and address them before proposing the commit.
1211
- If only nitpick-level findings, report them and continue to the commit proposal.
1312
- If `coderabbit` is not installed, skip this step with a note.
1413

15-
Run steps 1–4, report the results clearly, then run step 5 (CodeRabbit review) if available, then propose a branch name and commit message for my approval using the format `type(scope): description (#issue)` (max 80 chars; types: `feat` `fix` `chore` `docs` `test` `refactor` `ci` `perf`). Do not create the branch or commit until I explicitly confirm.
14+
Run steps 1–3, report the results clearly, then run step 4 (CodeRabbit review) if available, then propose a branch name and commit message for my approval using the format `type(scope): description (#issue)` (max 80 chars; types: `feat` `fix` `chore` `docs` `test` `refactor` `ci` `perf`). Do not create the branch or commit until I explicitly confirm.

pom.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,31 @@
310310
<goal>report</goal>
311311
</goals>
312312
</execution>
313+
<execution>
314+
<id>check</id>
315+
<goals>
316+
<goal>check</goal>
317+
</goals>
318+
<configuration>
319+
<rules>
320+
<rule>
321+
<element>BUNDLE</element>
322+
<limits>
323+
<limit>
324+
<counter>INSTRUCTION</counter>
325+
<value>COVEREDRATIO</value>
326+
<minimum>0.80</minimum>
327+
</limit>
328+
<limit>
329+
<counter>BRANCH</counter>
330+
<value>COVEREDRATIO</value>
331+
<minimum>0.80</minimum>
332+
</limit>
333+
</limits>
334+
</rule>
335+
</rules>
336+
</configuration>
337+
</execution>
313338
</executions>
314339
</plugin>
315340
</plugins>

0 commit comments

Comments
 (0)