Skip to content
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

Idea: Add a lint that looks for un-remembered instantiation of types or functions whose names end in "State" #171

Open
ZacSweers opened this issue Sep 25, 2023 · 3 comments

Comments

@ZacSweers
Copy link
Collaborator

This would be similar to the new UnrememberedStateDetector in androidx, but be a warning lint to catch likely cases. @StateFactoryMarker works for functions, but it doesn't help with cases where people instantiate state classes directly.

Thoughts @chrisbanes @mrmans0n?

@chrisbanes
Copy link
Collaborator

Sounds good to me! I thought we had something like that already? Or maybe it was an idea we had but never got around to implementing.

@ZacSweers
Copy link
Collaborator Author

We have the view model factory lint but not sure there's anything else

@ZacSweers
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants