@@ -271,8 +271,11 @@ var IsModuleOverride = map[string]bool{
271
271
"single_version_override" : true ,
272
272
}
273
273
274
+ // RuleLoadLocation contains custom locations for loading rules.
275
+ var RuleLoadLocation = map [string ]string {}
276
+
274
277
// OverrideTables allows a user of the build package to override the special-case rules. The user-provided tables replace the built-in tables.
275
- func OverrideTables (labelArg , denylist , listArg , sortableListArg , sortDenylist , sortAllowlist map [string ]bool , namePriority map [string ]int , stripLabelLeadingSlashes , shortenAbsoluteLabelsToRelative bool ) {
278
+ func OverrideTables (labelArg , denylist , listArg , sortableListArg , sortDenylist , sortAllowlist map [string ]bool , namePriority map [string ]int , stripLabelLeadingSlashes , shortenAbsoluteLabelsToRelative bool , ruleLoadLocation map [ string ] string ) {
276
279
IsLabelArg = labelArg
277
280
LabelDenylist = denylist
278
281
IsListArg = listArg
@@ -282,10 +285,11 @@ func OverrideTables(labelArg, denylist, listArg, sortableListArg, sortDenylist,
282
285
NamePriority = namePriority
283
286
StripLabelLeadingSlashes = stripLabelLeadingSlashes
284
287
ShortenAbsoluteLabelsToRelative = shortenAbsoluteLabelsToRelative
288
+ RuleLoadLocation = ruleLoadLocation
285
289
}
286
290
287
291
// MergeTables allows a user of the build package to override the special-case rules. The user-provided tables are merged into the built-in tables.
288
- func MergeTables (labelArg , denylist , listArg , sortableListArg , sortDenylist , sortAllowlist map [string ]bool , namePriority map [string ]int , stripLabelLeadingSlashes , shortenAbsoluteLabelsToRelative bool ) {
292
+ func MergeTables (labelArg , denylist , listArg , sortableListArg , sortDenylist , sortAllowlist map [string ]bool , namePriority map [string ]int , stripLabelLeadingSlashes , shortenAbsoluteLabelsToRelative bool , ruleLoadLocation map [ string ] string ) {
289
293
for k , v := range labelArg {
290
294
IsLabelArg [k ] = v
291
295
}
@@ -309,4 +313,7 @@ func MergeTables(labelArg, denylist, listArg, sortableListArg, sortDenylist, sor
309
313
}
310
314
StripLabelLeadingSlashes = stripLabelLeadingSlashes || StripLabelLeadingSlashes
311
315
ShortenAbsoluteLabelsToRelative = shortenAbsoluteLabelsToRelative || ShortenAbsoluteLabelsToRelative
316
+ for k , v := range ruleLoadLocation {
317
+ RuleLoadLocation [k ] = v
318
+ }
312
319
}
0 commit comments