Skip to content

feat: add the Compose lint ruleset to the Detekt gate - #160

Merged
simtop merged 1 commit into
masterfrom
feat/compose-lint-rules
Aug 9, 2026
Merged

feat: add the Compose lint ruleset to the Detekt gate#160
simtop merged 1 commit into
masterfrom
feat/compose-lint-rules

Conversation

@simtop

@simtop simtop commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire mrmans0n/compose-rules (the actively maintained continuation of twitter/compose-rules, frozen since 2023) into the Detekt gate via the shared billionbeers.detekt convention plugin
  • Pinned to 0.4.23, the last release built against Detekt 1.23.x — 0.5.0+ requires Detekt 2.0.0-alpha, which would invalidate every module's detekt-baseline.xml
  • ~30 Compose rules enabled in config/detekt/detekt.yml; UnstableCollections, Material2, ComposableNestingDepth, PreviewNaming left off with reasons in comments; CompositionLocalAllowlist allowlists the 5 legitimate CompositionLocals in the codebase; ViewModelInjection repointed at metroViewModel/assistedMetroViewModel since its Hilt-shaped defaults were silently inert against this project's Metro DI
  • 35 pre-existing findings across 8 modules grandfathered into per-module detekt-baseline.xml (including a new baseline for feature/beerdetail, which had none before) — same adoption pattern as Detekt itself
  • gradle/verification-metadata.xml regenerated to cover the new dependency (ADR 0007)
  • AGENTS.md §5 updated with the ruleset source and config choices

Test plan

  • make lint (Detekt) passes clean
  • make format (Spotless) passes clean
  • make test passes

Detekt caught general issues but nothing Compose-specific (modifier
plumbing, ViewModel scoping, unstable params). Wired in
mrmans0n/compose-rules - the actively maintained continuation of
twitter/compose-rules, pinned to the last release built against our
Detekt 1.23.x (0.5.0+ needs Detekt 2.0.0-alpha, which would blow up
every baseline). ViewModelInjection is repointed at metroViewModel
since the defaults assume Hilt. The 35 pre-existing findings across
8 modules are grandfathered into their detekt-baseline.xml, same as
the original Detekt adoption.
@simtop
simtop enabled auto-merge (squash) August 9, 2026 17:10
@simtop
simtop merged commit 8c94d67 into master Aug 9, 2026
12 checks passed
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