-
Notifications
You must be signed in to change notification settings - Fork 25
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
Unable to suppress Lint warnings #57
Comments
I think this may be a bug in lint itself since compose modifies the function signature, you'll need to raise this on the android issue tracker as we don't control suppressibility. We can re-open if they say otherwise. In the meantime, a possible workaround may be to use a baseline file instead. |
We ran into this also. I reported the issue and pointed to this issue for reference. |
Another possible workaround is that lint does support kotlin's |
No dice |
Hmmmm, I went to investigate that bug (https://issuetracker.google.com/issues/318532624) and I can't reproduce it. I opened the Slack lint project, opened (By the way, in that codebase I see this -- |
Thanks for looking into it. How likely is that related to the test harness or detector implementation? I skimmed the implementation and nothing stuck out to me as obviously wrong. Here's a repro: https://github.com/jzbrooks/SuppressLintWoe |
Thanks for the reproduce case! I debugged this -- and discovered that this was fixed back in August. Basically, this lint check passes in the Kotlin PSI element as the context location (used for suppress directive lookup) instead of the UAST element, and that wasn't handled right (until August). If you update to 8.3.0-beta01 or later it should work. |
Great. Thanks! |
Awesome! Thanks all for the discussion here.
I believe this was copied over from some internal lints, and predate knowledge of lint tests' ability to specify a specific test mode when asserting error/warning strings :). I'm slowly removing all these in #209 |
I'm not being able to suppress
ComposeModifierMissing
lint warningsBoth, the lint task (
gradlew lint
) fails and Android Studio displays it with red underlines.Android Studio version: Electric Eel 2022.1.1 Patch 1
AGP version: 7.4.1
Compose lint version: 1.0.0
Let me know if you need any more information to reproduce
The text was updated successfully, but these errors were encountered: