Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c309aa3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Android Lint: allow local override of --exitcode flag"

parents 4476209b b597abde
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)
	}