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/staticcheck/BUILD.bazel b/build/analysis/staticcheck/BUILD.bazel
new file mode 100644
index 0000000..589f7c1
--- /dev/null
+++ b/build/analysis/staticcheck/BUILD.bazel
@@ -0,0 +1,25 @@
+load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+
+go_library(
+    name = "staticcheck_lib",
+    srcs = ["staticcheck.go"],
+    importpath = "source.monogon.dev/build/analysis/staticcheck",
+    visibility = ["//build/analysis/staticcheck:__subpackages__"],
+    deps = [
+        "@co_honnef_go_tools//analysis/lint",
+        "@co_honnef_go_tools//quickfix",
+        "@co_honnef_go_tools//simple",
+        "@co_honnef_go_tools//staticcheck",
+        "@co_honnef_go_tools//stylecheck",
+        "@co_honnef_go_tools//unused",
+        "@org_golang_x_tools//go/analysis",
+    ],
+)
+
+write_source_files(
+    name = "staticcheck_analyzers",
+    files = {
+        "analyzers.bzl": "//build/analysis/staticcheck/generate_analyzers:analyzers",
+    },
+)