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:
parent
17e0b7607a
commit
1735b2e096
1 changed files with 6 additions and 17 deletions
|
@ -58,7 +58,7 @@ func init() {
|
|||
AddNeverAllowRules(createMakefileGoalRules()...)
|
||||
AddNeverAllowRules(createInitFirstStageRules()...)
|
||||
AddNeverAllowRules(createProhibitFrameworkAccessRules()...)
|
||||
AddNeverAllowRules(createBp2BuildRules()...)
|
||||
AddNeverAllowRules(createBp2BuildRule())
|
||||
}
|
||||
|
||||
// Add a NeverAllow rule to the set of rules to apply.
|
||||
|
@ -66,22 +66,11 @@ func AddNeverAllowRules(rules ...Rule) {
|
|||
neverallows = append(neverallows, rules...)
|
||||
}
|
||||
|
||||
func createBp2BuildRules() []Rule {
|
||||
rules := []Rule{}
|
||||
bp2buildAvailableAllowedDirs := []string{
|
||||
// Can we just allowlist these modules in allowlists.go?
|
||||
"bionic/libc",
|
||||
}
|
||||
|
||||
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 createBp2BuildRule() Rule {
|
||||
return NeverAllow().
|
||||
With("bazel_module.bp2build_available", "true").
|
||||
Because("setting bp2build_available in Android.bp is not " +
|
||||
"supported for custom conversion, use allowlists.go instead.")
|
||||
}
|
||||
|
||||
func createIncludeDirsRules() []Rule {
|
||||
|
|
Loading…
Reference in a new issue