diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 72200d90b6..329afbd2ec 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -191,4 +191,5 @@ dependencies { implementation(libs.showkase) ksp(libs.showkase.processor) + detektPlugins("com.twitter.compose.rules:detekt:0.0.26") } diff --git a/tools/detekt/detekt.yml b/tools/detekt/detekt.yml index 037847dcbf..9e800e8232 100644 --- a/tools/detekt/detekt.yml +++ b/tools/detekt/detekt.yml @@ -101,3 +101,49 @@ comments: active: false UndocumentedPublicProperty: 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