Browse Source

Add twitter rules for Compose

feature/bma/flipper
Benoit Marty 2 years ago
parent
commit
6340d8640c
  1. 1
      app/build.gradle.kts
  2. 46
      tools/detekt/detekt.yml

1
app/build.gradle.kts

@ -191,4 +191,5 @@ dependencies {
implementation(libs.showkase) implementation(libs.showkase)
ksp(libs.showkase.processor) ksp(libs.showkase.processor)
detektPlugins("com.twitter.compose.rules:detekt:0.0.26")
} }

46
tools/detekt/detekt.yml

@ -101,3 +101,49 @@ comments:
active: false active: false
UndocumentedPublicProperty: UndocumentedPublicProperty:
active: false active: false
TwitterCompose:
CompositionLocalAllowlist:
active: true
# You can optionally define a list of CompositionLocals that are allowed here
# allowedCompositionLocals: LocalSomething,LocalSomethingElse
CompositionLocalNaming:
active: true
ContentEmitterReturningValues:
active: true
# You can optionally add your own composables here
# contentEmitters: MyComposable,MyOtherComposable
ModifierComposable:
active: true
ModifierMissing:
active: true
ModifierReused:
active: true
ModifierWithoutDefault:
active: true
MultipleEmitters:
active: true
# You can optionally add your own composables here
# contentEmitters: MyComposable,MyOtherComposable
MutableParams:
active: true
ComposableNaming:
active: true
# You can optionally disable the checks in this rule for regex matches against the composable name (e.g. molecule presenters)
# allowedComposableFunctionNames: .*Presenter,.*MoleculePresenter
ComposableParamOrder:
active: true
PreviewNaming:
active: true
PreviewPublic:
active: true
# You can optionally disable that only previews with @PreviewParameter are flagged
# previewPublicOnlyIfParams: false
RememberMissing:
active: true
UnstableCollections:
active: true
ViewModelForwarding:
active: true
ViewModelInjection:
active: true

Loading…
Cancel
Save