Commit 2deb078
feat: update CONTRIBUTING.md and increase code coverage threshold
Implements issues #331 and #328 to improve code quality standards
and testing requirements.
Changes:
1. Updated CONTRIBUTING.md:
- Added Spotless auto-formatting documentation
- Updated code style to Google Java Style (2 spaces)
- Enhanced Checkstyle section with key rules
- Added automatic formatting commands
- Clarified formatting vs validation tools
- Updated examples to match Google Style
2. Increased JaCoCo Coverage Threshold (Issue #328):
- Instruction coverage: 1% → 60%
- Branch coverage: 1% → 60%
- Line coverage: 1% → 60%
- Missed class count: 100 → 10
Quality Improvements:
- Enforces 60% minimum code coverage (industry standard)
- Ensures new code includes adequate testing
- Automatic formatting reduces code review friction
- Clear contribution guidelines for new developers
- Consistent code style across all modules
Developer Workflow:
```bash
# Before committing:
mvn spotless:apply # Auto-format code
mvn clean verify # Run all checks including coverage
# Checks that run automatically:
- Spotless format check
- Checkstyle validation
- JaCoCo coverage validation (60% minimum)
- OWASP dependency scan
```
Breaking Change:
Projects with less than 60% coverage will now fail the build.
This is intentional to ensure quality standards. Teams should:
1. Add tests for existing uncovered code, or
2. Temporarily exclude legacy modules from coverage checks
Coverage can be checked before commit:
```bash
mvn clean test jacoco:report
# View: target/site/jacoco/index.html
```
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 83ab1a9 commit 2deb078
2 files changed
Lines changed: 68 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
273 | 285 | | |
274 | 286 | | |
275 | 287 | | |
276 | 288 | | |
277 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
278 | 297 | | |
279 | 298 | | |
280 | 299 | | |
281 | 300 | | |
282 | 301 | | |
283 | 302 | | |
284 | | - | |
| 303 | + | |
285 | 304 | | |
286 | 305 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
291 | 310 | | |
292 | 311 | | |
293 | 312 | | |
| |||
352 | 371 | | |
353 | 372 | | |
354 | 373 | | |
355 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
356 | 398 | | |
357 | 399 | | |
358 | 400 | | |
359 | 401 | | |
| 402 | + | |
360 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
361 | 407 | | |
362 | 408 | | |
363 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
364 | 418 | | |
365 | 419 | | |
366 | 420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
| 368 | + | |
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
0 commit comments