blob: b9f915b16e75f58e4a5f76bc21f7ee2f3bc72959 [file] [log] [blame]
Tim Windelschmidta0684402025-02-25 11:32:40 +01001# Flattens the previously generated entries together
2def build_nogo_config(v):
3 out = {}
4 for exp in v:
5 for check, cfg in exp.items():
6 if check not in out:
7 out[check] = {}
8
9 for k, v in cfg.items():
10 if k not in out[check]:
11 out[check][k] = {}
12
13 out[check][k] = out[check][k] | v
14
15 return out
16
17def exclude_from_checks(path, *checks):
18 return {
19 check: {
20 "exclude_files": {
21 "external/.+%s/" % path: "",
22 },
23 }
24 for check in checks
25 }
26
27def exclude_from_external(checks):
28 return {
29 check: {
30 "exclude_files": {
31 # Don't run linters on external dependencies
32 "external/": "third_party",
33 "bazel-out/": "generated_output",
34 "cgo/": "cgo",
35 },
36 }
37 for check in checks
38 }