Merge "Android Lint: allow local override of --exitcode flag" am: 5c309aa37a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2502955 Change-Id: I304b32299d2b99332e89ee03cff977ff559edf6e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -496,7 +496,6 @@ func (l *linter) lint(ctx android.ModuleContext) {
|
||||
FlagWithArg("--java-language-level ", l.javaLanguageLevel).
|
||||
FlagWithArg("--kotlin-language-level ", l.kotlinLanguageLevel).
|
||||
FlagWithArg("--url ", fmt.Sprintf(".=.,%s=out", android.PathForOutput(ctx).String())).
|
||||
Flag("--exitcode").
|
||||
Flag("--apply-suggestions"). // applies suggested fixes to files in the sandbox
|
||||
Flags(l.properties.Lint.Flags).
|
||||
Implicit(annotationsZipPath).
|
||||
@@ -505,6 +504,10 @@ func (l *linter) lint(ctx android.ModuleContext) {
|
||||
rule.Temporary(lintPaths.projectXML)
|
||||
rule.Temporary(lintPaths.configXML)
|
||||
|
||||
if exitCode := ctx.Config().Getenv("ANDROID_LINT_SUPPRESS_EXIT_CODE"); exitCode == "" {
|
||||
cmd.Flag("--exitcode")
|
||||
}
|
||||
|
||||
if checkOnly := ctx.Config().Getenv("ANDROID_LINT_CHECK"); checkOnly != "" {
|
||||
cmd.FlagWithArg("--check ", checkOnly)
|
||||
}
|
||||
|
Reference in New Issue
Block a user