v0.6.0
·
18 commits
to refs/heads/main
since this release
🎉 A few new rules for you all
For both detekt and ktlint:
ComposableNestingDepth, an opt-in rule to add a limit to how many nested content emitters could be used.
And these are detekt exclusive, as they require the Kotlin Analysis API.
StaleRememberUpdatedStateInRememberto find sneaky misuses of rememberUpdatedStateMissingReadOnlyComposableto find composables that could be optimized by being annotated by@ReadOnlyComposable.InvalidReadOnlyComposableto find annotated@ReadOnlyComposables that shouldn't be.UnnecessaryComposableto find composables that don't need to be composable functions.VarsWithoutStateBackingto find potential misuses of var in a composable function.ConditionHoistto find issues where the contents of a slotted composable function don't emit anything due to branching code.
This is a significant departure for this ruleset, as they are the first rules that are actually using type resolution.
What's changed
- Add ConditionHoist detekt rule (#647) @mrmans0n
- Add VarsWithoutStateBacking detekt rule (#646) @mrmans0n
- Add UnnecessaryComposable detekt rule (#645) @mrmans0n
- Add missing read-only composable detekt rule (#644) @mrmans0n
- Add invalid read-only composable detekt rule (#643) @mrmans0n
- Add
StaleRememberUpdatedStateInRememberdetekt rule (#642) @mrmans0n - Add ComposableNestingDepth rule (#635) @Noahs212
- Update astral-sh/setup-uv action to v8.2.0 (#641) @renovate[bot]
- Update plugin shadowJar to v9.4.2 (#640) @renovate[bot]
- Fix #637: make defaults-visibility suppressible at declaration scope (#639) @mrmans0n
- Update plugin spotless to v8.6.0 (#638) @renovate[bot]
- Update plugin com.gradle.develocity to v4.4.2 (#636) @renovate[bot]
- Update dependency androidx.compose:compose-bom to v2026.05.01 (#634) @renovate[bot]
Dependency Matrix
| linter | version | kotlin version |
|---|---|---|
| detekt | 2.0.0-alpha.3 | 2.3.21 |
| ktlint | 1.8.0 | 2.2.21 |