diff options
author | 2022-11-18 18:20:20 +0000 | |
---|---|---|
committer | 2022-11-18 20:56:05 +0000 | |
commit | e17645fe304994ab999196c9dc3fb3dd9c6ab36a (patch) | |
tree | 03ff5664b778996227ca9c955bba1244f18a142a /java/lint.go | |
parent | 6f235d9b3947f9a34ddf36d4632764f2327b415b (diff) |
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
Diffstat (limited to 'java/lint.go')
-rw-r--r-- | java/lint.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/lint.go b/java/lint.go index 9827159c8..7a6e5d9c1 100644 --- a/java/lint.go +++ b/java/lint.go @@ -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(), |