Status Update
Comments
uc...@google.com <uc...@google.com>
tn...@google.com <tn...@google.com>
tn...@google.com <tn...@google.com> #2
This is fixed by Change-Id: Icdccf15d6fb09b0ed8239e8237736c2c485042b4 for Studio 4.2. It's now a separate issue (instead of using the general LintError issue), such that it can be enabled/disabled individually, and it's an issue that has default severity of warning, which means by default it won't break the build.
But, not that this is basically the opposite of the issue which requested this behavior to begin with:
Since that issue was filed by Jake, who now seems to agree with the opposite behavior (see
go...@jakewharton.com <go...@jakewharton.com> #3
Oh wow. That's legitimately funny.
I guess in my defense the original issue was for a typo of a built-in check and this one (at least for me) is for a third-party check that may not be available in the dependency graph.
Somewhat related: maybe it would be useful to try and suggest valid lint IDs when an invalid one is found using something like edit distance and a cutoff?
br...@capitalone.com <br...@capitalone.com> #4
Somewhat related: maybe it would be useful to try and suggest valid lint IDs when an invalid one is found using something like edit distance and a cutoff?
Agreed, this would be a good enhancement to whatever is put in the report for the new Issue. Something like "Invalid Issue Id UnuseResource
, did you instead mean UnusedResource
?"
Thanks for making this change, will make our lives a lot easier when inheriting rules from 3P artifact upticks.
tn...@google.com <tn...@google.com> #5
Good idea! Lint already has an edit distance implementation and uses it in some other lint checks (such as WrongIdDetector) so this was easy to hook up; should also be in 4.2 via Change-Id: Ic4d6c86a4394c8823b8e5e45e569a452b11e9de7.
Description
Build: AI-192.7142.36.36.6392135, 202004132352,
AI-192.7142.36.36.6392135, JRE 1.8.0_212-release-1586-b4-5784211x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.15.4, screens 1920x1200; Retina
AS: 3.6.3; Kotlin plugin: 1.3.71-release-Studio3.6-1; Android Gradle Plugin: 3.6.3; Gradle: 6.4.1; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.
See conversation here on the lint-dev Google Group.
Current behavior: When a module inherits lint suppressions that suppress a lint rule that is not actually applied to the given module, the build fails with an error like:
Expected behavior: Because the lint rule is not applied to the module, it doesn't matter that the suppression isn't targeting any rule for that module. Just ignore (and possibly place something in the lint report) and allow the build to succeed.