summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-03 23:46:22 +0200
committerPaul Buetow <paul@buetow.org>2026-03-03 23:46:22 +0200
commit4a621671749db8e13ebbb23953385a9f69317036 (patch)
tree0622e9576faa09d0ae885e067e217ee004eb6234
parent626bbc46f9debf892ee250cd104fd37371f2e41e (diff)
build: add golangci-lint config and mage target
-rw-r--r--.golangci.yml14
-rw-r--r--Magefile.go4
2 files changed, 18 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 0000000..9aa3b5c
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,14 @@
+run:
+ timeout: 5m
+
+linters:
+ enable:
+ - errcheck
+ - govet
+ - ineffassign
+ - staticcheck
+ - unused
+
+issues:
+ max-issues-per-linter: 0
+ max-same-issues: 0
diff --git a/Magefile.go b/Magefile.go
index 4320a9e..f0da006 100644
--- a/Magefile.go
+++ b/Magefile.go
@@ -20,6 +20,10 @@ func Test() error {
return sh.RunV("go", "test", "./...")
}
+func Lint() error {
+ return sh.RunV("golangci-lint", "run", "./...")
+}
+
func Install() error {
return sh.RunV("go", "install", "./cmd/timr")
}