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

Commit e17645fe authored by mattgilbride's avatar mattgilbride
Browse files

lint: always run module specified in ANDROID_LINT_CHECK_EXTRA_MODULES

Before this change, ANDROID_LINT_EXTRA_CHECK_MODULES was only read if
ANDROID_LINT_CHECK was also set.  This change allows an entire module of
checks to be added to lint without having to specify all of the
individuals with ANDROID_LINT_CHECK.

This is part of a workaround to run some lint checks globally, but is
useful to provide more flexibility generally.

Bug: 236558918
Test: manually tested with AndroidFrameworkLintChecker
Change-Id: I2d3ec8a997d902c9d00a577a56f4b152b10e078a
parent 6f235d9b
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -190,10 +190,8 @@ func (l *linter) deps(ctx android.BottomUpMutatorContext) {

	extraCheckModules := l.properties.Lint.Extra_check_modules

	if checkOnly := ctx.Config().Getenv("ANDROID_LINT_CHECK"); checkOnly != "" {
		if checkOnlyModules := ctx.Config().Getenv("ANDROID_LINT_CHECK_EXTRA_MODULES"); checkOnlyModules != "" {
			extraCheckModules = strings.Split(checkOnlyModules, ",")
		}
	if extraCheckModulesEnv := ctx.Config().Getenv("ANDROID_LINT_CHECK_EXTRA_MODULES"); extraCheckModulesEnv != "" {
		extraCheckModules = append(extraCheckModules, strings.Split(extraCheckModulesEnv, ",")...)
	}

	ctx.AddFarVariationDependencies(ctx.Config().BuildOSCommonTarget.Variations(),