-
Notifications
You must be signed in to change notification settings - Fork 628
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
Add a lint rule for ensuring usage of internal version of collectAsState
.
#8497
Add a lint rule for ensuring usage of internal version of collectAsState
.
#8497
Conversation
e4f1639
to
a442567
Compare
collectAsState
.
Diffuse output:
APK
DEX
|
b2b65f9
to
f21a606
Compare
collectAsState
.collectAsStateSafely
.
I'm wondering if we want to rename |
I don't have a strong preference on naming, if the lint rule works. |
Will rename in a separate PR |
This must still not be triggered. There are |
aee5319
to
b6b4d8c
Compare
@jaynewstrom-stripe Working as expected now, I can add a separate commit that replaces all the usages once this code looks good. |
Sounds good to me. |
b6b4d8c
to
10539bf
Compare
10539bf
to
a76f98c
Compare
@@ -1,3 +1,5 @@ | |||
@file:Suppress("ComposeCollectAsStateUsageIssue") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one I didn't replace in production code. Financial connections has a custom collectAsState
here that has additional logic.
This replaces all the usages in the SDK outside of those found in our example modules ( |
lint/src/test/java/com/stripe/android/lint/ComposeCollectAsStateUsageDetectorTest.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm for Identity
collectAsStateSafely
.collectAsState
.
58bb4c7
a76f98c
to
58bb4c7
Compare
58bb4c7
to
66fafb7
Compare
Summary
Add a lint rule for ensuring usage of of internal version of
collectAsState
.Motivation
Ensures we continue using of internal version of
collectAsState
in the future.Testing