build/analysis: replace nogo staticcheck adapter

The upstream repo is not very active and requires us to override the rules_go
dependency name. By building our own adapter, we don't need it anymore.

Change-Id: I6e539881a23a1934d0bf6ebc2d79d02469bd4c6a
Reviewed-on: https://review.monogon.dev/c/monogon/+/4481
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/build/analysis/BUILD.bazel b/build/analysis/BUILD.bazel
index bbb80d2..98a1563 100644
--- a/build/analysis/BUILD.bazel
+++ b/build/analysis/BUILD.bazel
@@ -1,6 +1,6 @@
 load("@bazel_skylib//rules:write_file.bzl", "write_file")
-load("@com_github_sluongng_nogo_analyzer//staticcheck:def.bzl", ALL_STATICCHECK_ANALYZERS = "ANALYZERS", format_staticcheck_analyzers = "staticcheck_analyzers")
 load("@io_bazel_rules_go//go:def.bzl", "nogo")
+load("//build/analysis/staticcheck:def.bzl", ALL_STATICCHECK_ANALYZERS = "ANALYZER_NAMES", filtered_staticcheck_analyzers = "filtered_analyzers")
 load(":def.bzl", "build_nogo_config", "exclude_from_checks", "exclude_from_external")
 
 # NOGO_PASSES contains all enabled analyzers that nogo should execute.
@@ -73,12 +73,12 @@
 # Combine all staticcheck analyzers with a list
 # of all globally disabled staticcheck analyzers
 # and append them to the nogo passes.
-NOGO_PASSES += format_staticcheck_analyzers(ALL_STATICCHECK_ANALYZERS + [
-    "-ST1000",  # at least one file in a package should have a package comment
-    "-ST1003",  # should not use ALL_CAPS in Go names; use CamelCase instead
-    "-QF1006",  # could lift into loop condition
-    "-QF1003",  # could use tagged switch
-    "-QF1008",  # Omit embedded fields from selector expression
+NOGO_PASSES += filtered_staticcheck_analyzers([
+    "ST1000",  # at least one file in a package should have a package comment
+    "ST1003",  # should not use ALL_CAPS in Go names; use CamelCase instead
+    "QF1006",  # could lift into loop condition
+    "QF1003",  # could use tagged switch
+    "QF1008",  # Omit embedded fields from selector expression
 ])
 
 NOGO_PASSES += [