Skip to content

chore: add static analysis, coverage, and a documentation site#4

Draft
AndroidPoet wants to merge 1 commit into
masterfrom
chore/library-standard
Draft

chore: add static analysis, coverage, and a documentation site#4
AndroidPoet wants to merge 1 commit into
masterfrom
chore/library-standard

Conversation

@AndroidPoet

Copy link
Copy Markdown
Owner

Brings the project up to the shared library quality standard. Spotless was already in place; this PR adds the remaining pillars and a docs site, adapting them to a Gradle/IntelliJ-plugin layout (rather than a multiplatform library).

What's in here

Static analysis (detekt)

  • Added the detekt plugin to the version catalog and applied it to every module from the root build.
  • Shared config at config/detekt/detekt.yml, tuned for a PSI-based rule engine (long branchy visitors, platform-mandated extension-point signatures).
  • Per-module baselines (compose-guard/detekt-baseline.xml, app/detekt-baseline.xml) snapshot the existing code so the gate is clean today and catches new issues going forward.

Coverage (kover)

  • Added the kover plugin to the catalog, applied it to the :compose-guard plugin module, and aggregated coverage at the root.
  • koverXmlReport / koverHtmlReport produce reports; koverVerify enforces a line-coverage floor (currently ~68%, floor set to 50%).

Documentation site

  • A Nextra docs site under website/: Introduction, Getting Started, Usage, Rule Reference (all 37 rules), Suppressing Rules, and Configuration — written specifically for the plugin.
  • A GitHub Pages deploy workflow (.github/workflows/docs.yml).

CI

  • The existing CI now also runs detekt (in the formatting job) and koverXmlReport koverVerify (in the plugin job).

Formatting

  • Spotless was already configured. Running spotlessApply normalized a handful of source/test files that had drifted from the configured style; those changes are formatting-only.

Verification

All checks were run locally against JDK 21 and pass:

  • ./gradlew spotlessCheck (pass)
  • ./gradlew detekt (pass, with baselines)
  • ./gradlew koverXmlReport koverVerify (pass, ~68% line coverage)
  • pnpm build in website/ (pass, all pages export cleanly)

No pillar was skipped.

Brings the repo up to the shared library standard:

- detekt static analysis wired across all modules with a shared
  config/detekt/detekt.yml and per-module baselines for the existing code.
- kover coverage aggregated over the :compose-guard plugin module, with
  koverXmlReport/koverHtmlReport and a koverVerify floor (~68% today).
- A Nextra documentation site under website/ (Introduction, Getting
  Started, Usage, Rule Reference, Suppressing Rules, Configuration) plus a
  GitHub Pages deploy workflow.
- CI now runs detekt and koverVerify alongside the existing spotless check.

Spotless was already present; this also normalizes a few files that had
drifted from the configured formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant