From 4fa894a99c4fb63e4a0ce67a70b4236c9596cb04 Mon Sep 17 00:00:00 2001 From: Nacho Lopez Date: Sat, 10 Jun 2023 00:07:53 +0200 Subject: [PATCH] Revert change in ComposeContentEmitterReturningValues --- .../compose/rules/ComposeContentEmitterReturningValues.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/rules/common/src/main/kotlin/io/nlopez/compose/rules/ComposeContentEmitterReturningValues.kt b/rules/common/src/main/kotlin/io/nlopez/compose/rules/ComposeContentEmitterReturningValues.kt index 43be5df0..87bb5250 100644 --- a/rules/common/src/main/kotlin/io/nlopez/compose/rules/ComposeContentEmitterReturningValues.kt +++ b/rules/common/src/main/kotlin/io/nlopez/compose/rules/ComposeContentEmitterReturningValues.kt @@ -22,9 +22,6 @@ class ComposeContentEmitterReturningValues : ComposeKtVisitor { // We don't want to analyze composables that are extension functions, as they might be things like // BoxScope which are legit, and we want to avoid false positives. .filter { it.hasBlockBody() } - // Same applies to context receivers: we could have a BoxScope/ColumnScope/RowScope and it'd be legit. - // We don't have a way to know for sure, so we'd better avoid the issue altogether. - .filter { it.contextReceivers.isEmpty() } // We want only methods with a body .filterNot { it.hasReceiverType } // Now we want to get the count of direct emitters in them: the composables we know for a fact that output UI