Merge "Pass --write-reference-baseline to lint" am: 430059b422 am: dd0667e31d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1822276

Change-Id: I455c581e12063f406e257ff9e7307a5509648b2e
This commit is contained in:
Treehugger Robot 2021-12-21 09:13:09 +00:00 committed by Automerger Merge Worker
commit beb984e0cd

View file

@ -377,6 +377,7 @@ func (l *linter) lint(ctx android.ModuleContext) {
html := android.PathForModuleOut(ctx, "lint", "lint-report.html")
text := android.PathForModuleOut(ctx, "lint", "lint-report.txt")
xml := android.PathForModuleOut(ctx, "lint", "lint-report.xml")
baseline := android.PathForModuleOut(ctx, "lint", "lint-baseline.xml")
depSetsBuilder := NewLintDepSetBuilder().Direct(html, text, xml)
@ -447,6 +448,8 @@ func (l *linter) lint(ctx android.ModuleContext) {
cmd.FlagWithInput("--baseline ", lintBaseline.Path())
}
cmd.FlagWithOutput("--write-reference-baseline ", baseline)
cmd.Text("|| (").Text("if [ -e").Input(text).Text("]; then cat").Input(text).Text("; fi; exit 7)")
rule.Command().Text("rm -rf").Flag(lintPaths.cacheDir.String()).Flag(lintPaths.homeDir.String())