Blanket disallow bp2build_available: true.
This can be updated to use an allowlist again if the need arises. Bug: 251197532 Test: presubmits Change-Id: If56c45d8587a41b57358f249d20eb9a6ed9191ac
This commit is contained in:
@@ -58,7 +58,7 @@ func init() {
|
|||||||
AddNeverAllowRules(createMakefileGoalRules()...)
|
AddNeverAllowRules(createMakefileGoalRules()...)
|
||||||
AddNeverAllowRules(createInitFirstStageRules()...)
|
AddNeverAllowRules(createInitFirstStageRules()...)
|
||||||
AddNeverAllowRules(createProhibitFrameworkAccessRules()...)
|
AddNeverAllowRules(createProhibitFrameworkAccessRules()...)
|
||||||
AddNeverAllowRules(createBp2BuildRules()...)
|
AddNeverAllowRules(createBp2BuildRule())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a NeverAllow rule to the set of rules to apply.
|
// Add a NeverAllow rule to the set of rules to apply.
|
||||||
@@ -66,22 +66,11 @@ func AddNeverAllowRules(rules ...Rule) {
|
|||||||
neverallows = append(neverallows, rules...)
|
neverallows = append(neverallows, rules...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func createBp2BuildRules() []Rule {
|
func createBp2BuildRule() Rule {
|
||||||
rules := []Rule{}
|
return NeverAllow().
|
||||||
bp2buildAvailableAllowedDirs := []string{
|
With("bazel_module.bp2build_available", "true").
|
||||||
// Can we just allowlist these modules in allowlists.go?
|
Because("setting bp2build_available in Android.bp is not " +
|
||||||
"bionic/libc",
|
"supported for custom conversion, use allowlists.go instead.")
|
||||||
}
|
|
||||||
|
|
||||||
for _, dir := range bp2buildAvailableAllowedDirs {
|
|
||||||
rule := NeverAllow().
|
|
||||||
With("bazel_module.bp2build_available", "true").
|
|
||||||
NotIn(dir).
|
|
||||||
Because("disallowed usages of bp2build_available for custom conversion")
|
|
||||||
rules = append(rules, rule)
|
|
||||||
}
|
|
||||||
|
|
||||||
return rules
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func createIncludeDirsRules() []Rule {
|
func createIncludeDirsRules() []Rule {
|
||||||
|
Reference in New Issue
Block a user