Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 08 Jun 15:10
· 18 commits to refs/heads/main since this release
f5f02fd

🎉 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.

  • StaleRememberUpdatedStateInRemember to find sneaky misuses of rememberUpdatedState
  • MissingReadOnlyComposable to find composables that could be optimized by being annotated by @ReadOnlyComposable.
  • InvalidReadOnlyComposable to find annotated @ReadOnlyComposables that shouldn't be.
  • UnnecessaryComposable to find composables that don't need to be composable functions.
  • VarsWithoutStateBacking to find potential misuses of var in a composable function.
  • ConditionHoist to 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

Dependency Matrix

linter version kotlin version
detekt 2.0.0-alpha.3 2.3.21
ktlint 1.8.0 2.2.21