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/analyzer/analyzer.go b/build/analysis/staticcheck/analyzer/analyzer.go
new file mode 100644
index 0000000..b082533
--- /dev/null
+++ b/build/analysis/staticcheck/analyzer/analyzer.go
@@ -0,0 +1,21 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
+package staticcheck
+
+import (
+ "fmt"
+
+ "source.monogon.dev/build/analysis/staticcheck"
+)
+
+var (
+ name string
+ Analyzer = staticcheck.Analyzers[name]
+)
+
+func init() {
+ if Analyzer == nil {
+ panic(fmt.Sprintf("staticcheck analyzer %q not found", name))
+ }
+}