feat: add the Compose lint ruleset to the Detekt gate - #160
Merged
Conversation
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
enabled auto-merge (squash)
August 9, 2026 17:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mrmans0n/compose-rules(the actively maintained continuation oftwitter/compose-rules, frozen since 2023) into the Detekt gate via the sharedbillionbeers.detektconvention plugin0.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'sdetekt-baseline.xml~30Compose rules enabled inconfig/detekt/detekt.yml;UnstableCollections,Material2,ComposableNestingDepth,PreviewNamingleft off with reasons in comments;CompositionLocalAllowlistallowlists the 5 legitimate CompositionLocals in the codebase;ViewModelInjectionrepointed atmetroViewModel/assistedMetroViewModelsince its Hilt-shaped defaults were silently inert against this project's Metro DIdetekt-baseline.xml(including a new baseline forfeature/beerdetail, which had none before) — same adoption pattern as Detekt itselfgradle/verification-metadata.xmlregenerated to cover the new dependency (ADR 0007)AGENTS.md§5 updated with the ruleset source and config choicesTest plan
make lint(Detekt) passes cleanmake format(Spotless) passes cleanmake testpasses