Status Update
Comments
js...@google.com <js...@google.com> #2
Yes, changed as of
...
if (argument is UPolyadicExpression) {
...
for (operand in argument.operands) {
checkTypeDefConstant(context, annotation, operand, operand, true, usageInfo)
}
}
...
The 2nd operand
was previously errorNode
, the use site.
I'm afraid to say that this is intentional. Otherwise, i.e., if we still report the error(s) on the usage while the constant definition is composed of multiple wrong constants, then now we're facing duplicate report issue.
ju...@google.com <ju...@google.com> #3
In this case there can still be duplicate issue reported, but without being clear why. If I add @FlagDef int flags2 = SHIFT_FLAG;
to this example, I get both errors duplicated.
js...@google.com <js...@google.com> #4
Oh... that is interesting. Alright, so, in either way, we need to handle potential duplicate error reports inside TypedefDetector
. I have to rewrite that detector as part of 243 update (
js...@google.com <js...@google.com>
js...@google.com <js...@google.com>
an...@google.com <an...@google.com> #5
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 Canary 3
- Android Gradle Plugin 8.9.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
pr...@google.com <pr...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui-text-lint:1.8.0-alpha07
androidx.core:core:1.16.0-alpha01
androidx.lint:lint-gradle:1.0.0-alpha03
Description
Seeing this when trying to update AndroidX to lint 31.8.0-alpha08 from 31.8.0-alpha06. Assuming this is related to b/370778975 .
When an incorrect constant is used for an IntDef, and the constant was defined using the int shift operator, the lint error is appearing on the constant definition instead of the usage.
Repro example:
Instead of a lint error appearing on the
flags = SHIFT_FLAG
line, it instead appears on the definition ofSHIFT_FLAG
: