aboutsummaryrefslogtreecommitdiff
path: root/internal/cmd/gocheck/main.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-12-29 14:14:29 +0700
committerShulhan <ms@kilabit.info>2025-12-29 14:14:29 +0700
commit4654d45c96f86133bc0258d67c919dea7884fc46 (patch)
tree5ed00f5bd59dd72d862f19739edfdc9c759640a1 /internal/cmd/gocheck/main.go
parent5aa9337aeae709244846782ac98f276ad7965d78 (diff)
downloadhaminer-4654d45c96f86133bc0258d67c919dea7884fc46.tar.xz
make: replace external linter with gocheck
The fieldalignment and shadow is a linter from golang.org/x/tools. This program actually have an API that can be used. The pakakeh.go/lib/goanalysis wrap those APIs into a single function call that can be run inside a main. This minimize and simplified our tools dependencies.
Diffstat (limited to 'internal/cmd/gocheck/main.go')
-rw-r--r--internal/cmd/gocheck/main.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/cmd/gocheck/main.go b/internal/cmd/gocheck/main.go
new file mode 100644
index 0000000..112c08a
--- /dev/null
+++ b/internal/cmd/gocheck/main.go
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+// SPDX-FileCopyrightText: 2024 M. Shulhan <ms@kilabit.info>
+
+// Program gocheck implement go static analysis using [Analyzer] that are not
+// included in the default go vet.
+// See package [lib/goanalysis] for more information.
+//
+// [Analyzer]: https://pkg.go.dev/golang.org/x/tools/go/analysis#hdr-Analyzer
+// [lib/goanalysis]: https://pkg.go.dev/git.sr.ht/~shulhan/pakakeh.go/lib/goanalysis/
+package main
+
+import "git.sr.ht/~shulhan/pakakeh.go/lib/goanalysis"
+
+func main() {
+ goanalysis.Check()
+}