summaryrefslogtreecommitdiff
path: root/config/detekt/detekt.yml
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-08-24 07:54:01 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-08-24 07:54:01 +0000
commitda942624a4abd82797f563cf8c57f1124c5de435 (patch)
treef7e4325a4783a77544e6ed1f0ac44ea844757fe8 /config/detekt/detekt.yml
parentb299d57d6cc240381aed51f91e5a26f1e633d78d (diff)
Add TDD quality gate: detekt, coverage tracking, pre-commit hook; fix theme crash risk
CLAUDE.md now documents mandatory red-green-refactor TDD, a per-commit quality gate (build, tests, lint, detekt, coverage-non-decrease, WebView-JS justification, manifest permission diff, secret scan), and why each check exists (tracing back to real bugs this audit found). Wires up detekt (static analysis) and a standalone Jacoco setup (scoped to data/readability/opml/work/stash -- ui/ Compose screens are impractical to unit-test for coverage) via app/build.gradle.kts. Bumped Kotlin/KSP to 2.0.21/2.0.21-1.0.28 to match detekt 1.23.8's compatibility requirement. Also fixes the themes.xml bug the lint gate immediately caught: Theme.FeedReader's parent required API 29 while minSdk is 26 -- a real crash risk on Android 8.0-9.0 devices. Swapped to the plain (non-DayNight) DeviceDefault parent, since Compose already owns all real theming via a hardcoded darkColorScheme() regardless of system day/night state. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GMEkHeqKz6FLkmizowBTK
Diffstat (limited to 'config/detekt/detekt.yml')
-rw-r--r--config/detekt/detekt.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml
new file mode 100644
index 0000000..442435a
--- /dev/null
+++ b/config/detekt/detekt.yml
@@ -0,0 +1,16 @@
+# Builds on detekt's default ruleset (see app/build.gradle.kts: buildUponDefaultConfig = true).
+# Only overrides/additions relative to the defaults belong here -- keep this file small so
+# upgrading detekt pulls in sane new defaults automatically instead of us silently diverging.
+
+style:
+ MaxLineLength:
+ maxLineLength: 140 # several files carry long, deliberate rationale comments (see
+ # ReaderExtractor.kt) -- 120 (detekt's default) wrapped mid-explanation too aggressively.
+ ForbiddenComment:
+ active: false # this codebase deliberately doesn't use TODO/FIXME markers (see CLAUDE.md
+ # "why these checks") -- nothing to forbid.
+
+naming:
+ FunctionNaming:
+ ignoreAnnotated: ["Composable"] # Jetpack Compose's own naming convention is PascalCase for
+ # composable functions -- that's the correct style here, not a violation.