-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComposeViewModelForwarding doesn't check nested blocks #148
Labels
help wanted
Extra attention is needed
Comments
Can you please paste the error or screenshot? |
@ZacSweers Sorry for not stating it clear enough. The issue is that the ComposeViewModelForwarding rule does not report the error when it should. The case: @Composable
fun ComposableFalseNegative(
viewModel: ViewModel,
modifier: Modifier = Modifier
) {
Row {
ComposableWithViewModel(viewModel = viewModel)
}
} |
Could be the ViewModel logic since this approach makes it hard to reuse or replace it some cases |
ZacSweers
changed the title
ComposeViewModelForwarding produces false negative results
ComposeViewModelForwarding doesn't check nested blocks
Jan 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following codes report the error(as expected):
In the following screnario, the rule fails to detect the issue when the viewModel is transferred between Composable layers, leading to a false-negative:
The text was updated successfully, but these errors were encountered: