Closed PaulWoitaschek closed 2 years ago
Hi! Feel free to submit a PR deleting these kind of emitters from https://github.com/twitter/compose-rules/blob/main/core-common/src/main/kotlin/com/twitter/rules/core/util/Composables.kt (or add another list of these types, and then add an exclusion for those in the rule)
Now that this is in, I'm gonna kickstart the publishing process so the changes will be in maven central in version 0.0.23 in an hour or so.
Currently, the
modifier-missing-check
rule shows an error for things that are technically content emitters but don't emit real content in terms that the content is a different window.In the following example it does not really make sense to supply a modifier because the composable is really encapsulating it's contents.
The same applies for composables like
ModalBottomSheetLayout
.One solution could be be to extend the current rule logic and check if the function has a single direct content emitter which is one of these window-style content emitters.
Tested with 0.0.22