compose-lints
compose-lints copied to clipboard
Lint checks to aid with a healthy adoption of Compose
This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. ## Rate-Limited The following updates are currently rate-limited. To force their creation now, click...
Example code: ```kotlin @Composable fun Test(modifier: Modifier = Modifier){ Text(text = "TextOne") Text(text = "TextTwo") } ``` Expected result: [ComposeMultipleContentEmitters](https://github.com/slackhq/compose-lints/blob/main/compose-lint-checks/src/main/java/slack/lint/compose/MultipleContentEmittersDetector.kt) lint rule will trigger Actual result: Both that rule and...
Projects can setup a Compose Stability configuration file which define packages & classes that the compose compiler will mark as stable types: https://developer.android.com/develop/ui/compose/performance/stability/fix#configuration-file Is there any way for these lint...
The following code will trigger [`ComposeUnstableReceiver`](https://slackhq.github.io/compose-lints/rules/#unstable-receivers) when running with this configuration: - Kotlin 2.0.0-RC1 - K2 UAST (`android.lint.useK2Uast=true`) - Lint 8.5.0-alpha04 and above (`-Pandroid.experimental.lint.version=8.5.0-alpha04`) (worked fine on `alpha03`) ```kotlin import...
Some functions don't need to be `@Composable` but are. Maybe the function originally used some other `@Composable` thing but it was removed at some point, would be nice to have...
Artifact used: ``` com.slack.lint.compose:compose-lint-checks:1.3.1 ``` No `lint.xml` Example code: ```kotlin @Composable private fun Modifier.mediumPadding() = this.padding(16.dp) ``` Result: ``` Lint found 1 errors, 15 warnings. First failure: /.../MainActivity.kt: Error: Unexpected...
Here is an example: ```kotlin @Composable fun Example( modifier: Modifier = Modifier, content: @Composable BoxScope.() -> Unit, ) { val context = LocalContext.current val currentContent by rememberUpdatedState(content) val currentModifier by...
My codebase has some Modifier helpers that can't be converted to Modifier.Nodes, and want to use the [Composable factory guidance](https://developer.android.com/jetpack/compose/custom-modifiers#create_a_custom_modifier_using_a_composable_modifier_factory) but Slack lints (latest `1.3.1`) don't make that easy. Currently...
I was tinkering with some ideas a couple days ago and noticed that this check fails the use of a locally scoped modifier instance if it has the same name...