treewide: bump go deps and cleanup nogo linter config
This includes a patch for rules_go that is not merged yet, that allows
to run nogo against all external dependencies.
Change-Id: Ie874278d01e94116a2c3898bc98084c961318fd9
Reviewed-on: https://review.monogon.dev/c/monogon/+/3983
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/build/analysis/def.bzl b/build/analysis/def.bzl
new file mode 100644
index 0000000..b9f915b
--- /dev/null
+++ b/build/analysis/def.bzl
@@ -0,0 +1,38 @@
+# Flattens the previously generated entries together
+def build_nogo_config(v):
+ out = {}
+ for exp in v:
+ for check, cfg in exp.items():
+ if check not in out:
+ out[check] = {}
+
+ for k, v in cfg.items():
+ if k not in out[check]:
+ out[check][k] = {}
+
+ out[check][k] = out[check][k] | v
+
+ return out
+
+def exclude_from_checks(path, *checks):
+ return {
+ check: {
+ "exclude_files": {
+ "external/.+%s/" % path: "",
+ },
+ }
+ for check in checks
+ }
+
+def exclude_from_external(checks):
+ return {
+ check: {
+ "exclude_files": {
+ # Don't run linters on external dependencies
+ "external/": "third_party",
+ "bazel-out/": "generated_output",
+ "cgo/": "cgo",
+ },
+ }
+ for check in checks
+ }