chore(sonar): measure the theme resolvers instead of excluding them (M12 phase 8)
sonar.coverage.exclusions carried a ui/theme/** directory glob from the M11 coverage push (COVERAGE_PLAN.md §2 phase 0). At the time that directory held only Color.kt, Type.kt and the composables, so excluding all of it cost nothing. M12 put three pure resolvers in it. ShardPalette, ShardStructure and ShardTypeface are the milestone's core logic, they are the reason phases 1-3 could prove the no-op invariant as a JVM assertion, and JaCoCo on edge measures them at 98%, 100% and 100%. The directory glob was dropping all of that out of the denominator, so a future change that deleted those tests would not move the coverage number at all. The glob is now the one file it was really about: Theme.kt, the composable (52%). The rest of ui/theme/ is measured, all of it 93% or better. This does not rescue the gate - M12's already-measured code (data/appearance/ and ui/navigation/) covers at 93-100% and clears new_coverage >= 50 on its own. It makes the number honest about which code the tests actually hold. ui/components/ stays excluded as a directory: BrandAssets.kt is 11%, and the 9 tests it does have are on brandAssetUrl, the one part of it that is not a composable body. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,10 +32,17 @@ sonar.coverage.jacoco.xmlReportPaths=app/build/reports/jacoco/jacocoTestReport/j
|
||||
# tests), and Android-framework glue (Keystore-backed stores, foreground push service,
|
||||
# notifications, Hilt modules). Testable logic — ViewModels, repositories, DTOs, and
|
||||
# pure core/ code — stays measured. See docs/android/COVERAGE_PLAN.md §1.
|
||||
#
|
||||
# ui/theme/ is excluded FILE BY FILE, not as a directory. It held only constants and
|
||||
# composables when COVERAGE_PLAN.md §2 phase 0 drew the list; M12 added three pure
|
||||
# resolvers to it (ShardPalette, ShardStructure, ShardTypeface) which are the
|
||||
# milestone's core logic and are covered 98–100%. A `ui/theme/**` glob would drop them
|
||||
# out of the denominator and hide a future regression in them. Theme.kt is the one
|
||||
# composable left in the directory.
|
||||
sonar.coverage.exclusions=\
|
||||
app/src/main/java/**/ui/**/*Screen.kt,\
|
||||
app/src/main/java/**/ui/**/*Screen*.kt,\
|
||||
app/src/main/java/**/ui/theme/**,\
|
||||
app/src/main/java/**/ui/theme/Theme.kt,\
|
||||
app/src/main/java/**/ui/components/**,\
|
||||
app/src/main/java/**/ui/page/BlockRenderer.kt,\
|
||||
app/src/main/java/**/ui/shard/ShardComponents.kt,\
|
||||
|
||||
Reference in New Issue
Block a user