Merge "Error if visibility specifies a module"
This commit is contained in:
@@ -351,7 +351,10 @@ func parseRules(ctx BaseModuleContext, currentPkg, property string, visibility [
|
|||||||
case "__subpackages__":
|
case "__subpackages__":
|
||||||
r = subpackagesRule{pkg}
|
r = subpackagesRule{pkg}
|
||||||
default:
|
default:
|
||||||
continue
|
ctx.PropertyErrorf(property, "invalid visibility pattern %q. Must match "+
|
||||||
|
" //<package>:<scope>, //<package> or :<scope> "+
|
||||||
|
"where <scope> is one of \"__pkg__\", \"__subpackages__\"",
|
||||||
|
v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,7 +400,8 @@ func splitRule(ctx BaseModuleContext, ruleExpression string, currentPkg, propert
|
|||||||
// ensure all the rules on this module are checked.
|
// ensure all the rules on this module are checked.
|
||||||
ctx.PropertyErrorf(property,
|
ctx.PropertyErrorf(property,
|
||||||
"invalid visibility pattern %q must match"+
|
"invalid visibility pattern %q must match"+
|
||||||
" //<package>:<module>, //<package> or :<module>",
|
" //<package>:<scope>, //<package> or :<scope> "+
|
||||||
|
"where <scope> is one of \"__pkg__\", \"__subpackages__\"",
|
||||||
ruleExpression)
|
ruleExpression)
|
||||||
return false, "", ""
|
return false, "", ""
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user