compose-lints icon indicating copy to clipboard operation
compose-lints copied to clipboard

"Failure during lint analysis" with @Composable-annotated modifier extension function

Open GSala opened this issue 1 year ago • 1 comments

Artifact used:

com.slack.lint.compose:compose-lint-checks:1.3.1

No lint.xml

Example code:

@Composable
private fun Modifier.mediumPadding() = this.padding(16.dp)

Result:

Lint found 1 errors, 15 warnings. First failure:
  
/.../MainActivity.kt: Error: Unexpected failure during lint analysis of MainActivity.kt (this is a bug in lint or one of the libraries it depends on)

The modifier function should not be annotated with @Composable but it was in a function in a project where we were introducing the lint checks for the first time. It failed the lint instead of flagging it as an issue, or ignoring it.

GSala avatar Apr 02 '24 10:04 GSala

Please paste the associated stacktrace that is printed after, the bit you pasted isn't enough info :)

ZacSweers avatar Oct 02 '24 04:10 ZacSweers

Can't reproduce in 1.4.1

GSala avatar Oct 14 '24 09:10 GSala