mirror of
https://github.com/thunderbird/thunderbird-android.git
synced 2024-09-19 19:52:14 +02:00
Add detekt plugin for compose
This commit is contained in:
parent
b074534fec
commit
f4317b0fad
@ -42,3 +42,7 @@ tasks.withType<DetektCreateBaselineTask>().configureEach {
|
||||
"gradle/**",
|
||||
)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
detektPlugins(libs.detekt.plugin.compose)
|
||||
}
|
||||
|
@ -725,3 +725,47 @@ style:
|
||||
active: true
|
||||
excludeImports:
|
||||
- 'java.util.*'
|
||||
|
||||
Compose:
|
||||
CompositionLocalAllowlist:
|
||||
active: true
|
||||
allowedCompositionLocals: [LocalElevations, LocalImages, LocalSizes, LocalSpacings]
|
||||
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
|
||||
|
||||
|
@ -15,9 +15,13 @@ import app.k9mail.core.ui.compose.theme.MainTheme
|
||||
import app.k9mail.core.ui.compose.theme.ThunderbirdTheme
|
||||
|
||||
@Composable
|
||||
fun MainView() {
|
||||
fun MainView(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.then(modifier),
|
||||
) {
|
||||
K9Theme {
|
||||
MainContent(name = "K-9")
|
||||
@ -37,8 +41,14 @@ fun MainView() {
|
||||
@Composable
|
||||
fun MainContent(
|
||||
name: String,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Surface(modifier = Modifier.fillMaxWidth(), color = MainTheme.colors.background) {
|
||||
Surface(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.then(modifier),
|
||||
color = MainTheme.colors.background,
|
||||
) {
|
||||
Column {
|
||||
Text(text = "Hello $name!")
|
||||
Image(painter = painterResource(id = MainTheme.images.logo), contentDescription = "logo")
|
||||
|
@ -129,6 +129,8 @@ icu4j-charset = "com.ibm.icu:icu4j-charset:72.1"
|
||||
|
||||
leakcanary-android = "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
||||
|
||||
detekt-plugin-compose = "io.nlopez.compose.rules:detekt:0.1.1"
|
||||
|
||||
[bundles]
|
||||
shared-jvm-test = [
|
||||
"junit",
|
||||
|
Loading…
Reference in New Issue
Block a user