Fixed
Status Update
Comments
tn...@google.com <tn...@google.com> #2
I was thinking that in Gradle we'd stop saying "No issues found", and only produce output if one or more issues were found (I think that's the gist of that other bug request). That seems to be more in line with what other Gradle checks do. It does make sense for the text report to include it rather than be empty or deleted, so maybe this should be special cased to only happen when writing to stdout and under Gradle.
sp...@google.com <sp...@google.com> #3
Yes, I agree 100%.
sp...@google.com <sp...@google.com> #4
Fixed with Change-Id: I002903f8539345f832518f422fe7072de7de54b4.
Fix will be in AGP 7.1.0-alpha05.
[Deleted User] <[Deleted User]> #5
Comment has been deleted.
ru...@gmail.com <ru...@gmail.com> #6
Comment has been deleted.
Description
Currently, with
android.lintOptions.textReport true
, lint will output results to stdout when theAndroidLintTask
(e.g.,lintDebug
) runs, but there will be no such output if the task is up-to-date, which might mislead users to think that there are no lint issues.The desired behavior is for lint to output issues to stdout even if the task is up-to-date (or not to output anything if there are no issues - see Issue 158259845 ).
A possible fix would be to add a new lightweight task which would never be up-to-date and would only print the text report. I.e., change the lint build flow from this:
lintAnalyzeDebug
->lintDebug
to this:
lintAnalyzeDebug
->lintReportDebug
->lintDebug
where the new
lintReportDebug
task is the oldlintDebug
task, and the newlintDebug
is the lightweight task that is never up-to-date.Rejected alternative:
I considered modifying Issue 189877657
AndroidLintCopyReportTask
to print out the text report, but that task will not run ifAndroidLintTask
is up-to-date. In fact, we can consider adding that task's functionality to the new lightweight lint task to properly fixPS - Thanks to Tor for noticing this issue :)