Use DEFAULT_TIDY_HEADER_DIRS env variable.

am: 60bd4bf079

Change-Id: I4c34db5d306beb15cf8160aa905c06b8459ea8f6
This commit is contained in:
Chih-Hung Hsieh
2018-09-21 12:26:07 -07:00
committed by android-build-merger

View File

@@ -61,20 +61,25 @@ func init() {
// Give warnings to header files only in selected directories.
// Do not give warnings to external or vendor header files, which contain too
// many warnings.
pctx.StaticVariable("TidyDefaultHeaderDirs", strings.Join([]string{
"art/",
"bionic/",
"bootable/",
"build/",
"cts/",
"dalvik/",
"developers/",
"development/",
"frameworks/",
"libcore/",
"libnativehelper/",
"system/",
}, "|"))
pctx.VariableFunc("TidyDefaultHeaderDirs", func(ctx android.PackageVarContext) string {
if override := ctx.Config().Getenv("DEFAULT_TIDY_HEADER_DIRS"); override != "" {
return override
}
return strings.Join([]string{
"art/",
"bionic/",
"bootable/",
"build/",
"cts/",
"dalvik/",
"developers/",
"development/",
"frameworks/",
"libcore/",
"libnativehelper/",
"system/",
}, "|")
})
}
type PathBasedTidyCheck struct {