tidy cicd

rabbitprincess committed Mar 7, 2026 at 11:20 UTC bed2055bd997f5e218309f85215df5bb2880e816
4 files changed +16 -42
.github/workflows/ci.yml
+2 -2
@@ -33,8 +33,8 @@ jobs:
33
34 - name: Install CI tools
35 run: |
36 - go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
37 - go install golang.org/x/vuln/cmd/govulncheck@latest
36 + go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.1
37 + go install golang.org/x/vuln/cmd/govulncheck@v1.1.4
38
39 - name: Run checks
40 run: |
.golangci.yml
+2 -27
@@ -11,7 +11,7 @@ formatters:
11 local-prefixes: [github.com/gosuda, gosuda.org]
12
13 linters:
14 - default: standard
14 + default: none
15 enable:
16 - govet
17 - errcheck
@@ -24,22 +24,8 @@ linters:
24 - sqlclosecheck
25 - rowserrcheck
26 - durationcheck
27 - - makezero
27 - noctx
28 - wastedassign
30 - - misspell
31 - - whitespace
32 - - godot
33 - - usestdlibvars
34 - - testifylint
35 - - usetesting
36 - - containedctx
37 - - prealloc
38 - - intrange
39 - - fatcontext
40 - - perfsprint
41 - - reassign
42 - - mirror
29
30 exclusions:
31 paths:
@@ -49,7 +35,7 @@ linters:
35 - linters: [errcheck]
36 source: "^\\s*defer\\s+"
37 - path: "_test\\.go"
52 - linters: [bodyclose, errcheck, noctx, wrapcheck, funlen, dupl]
38 + linters: [bodyclose, errcheck, noctx]
39
40 settings:
41 errcheck:
@@ -73,17 +59,6 @@ linters:
59 - time.Now
60 - time.Sleep
61
76 - govet:
77 - enable-all: true
78 - disable:
79 - - fieldalignment
80 -
81 - perfsprint:
82 - strconcat: true
83 -
84 - fatcontext:
85 - check-struct-pointers: true
86 -
62 issues:
63 max-issues-per-linter: 0
64 max-same-issues: 0
Makefile
+11 -12
@@ -1,41 +1,40 @@
1 .PHONY: help fmt vet lint lint-auto test vuln tidy all run build build-frontend build-tunnel build-server clean
2
3 -.DEFAULT_GOAL := lint-auto
3 +.DEFAULT_GOAL := help
4 +
5 +GO_PACKAGES := ./cmd/... ./portal/... ./sdk/... ./types/...
6
7 help:
8 @echo "Available targets:"
7 - @echo " make lint-auto - Default local lint autofix pipeline"
9 + @echo " make fmt - Apply gofmt/goimports"
10 + @echo " make lint-auto - Run autofix lint/format pipeline"
11 @echo " make build - Build everything (frontend, tunnel, server)"
12 @echo " make build-frontend - Build React frontend (Tailwind CSS 4)"
13 @echo " make build-tunnel - Build portal-tunnel binaries"
11 - @echo " make build-server - Build Go relay server (includes frontend build)"
14 + @echo " make build-server - Build Go relay server (frontend built separately)"
15 @echo " make run - Run relay server"
16 @echo " make clean - Remove build artifacts"
17
18 fmt:
16 - golangci-lint run --fix > /dev/null || true
19 gofmt -w .
20 goimports -w .
19 - go fix ./...
21
22 vet:
22 - go vet ./...
23 + go vet $(GO_PACKAGES)
24
25 lint:
25 - golangci-lint run
26 + golangci-lint run $(GO_PACKAGES)
27
28 lint-auto:
29 gofmt -w .
30 goimports -w .
30 - go fix ./...
31 - golangci-lint run --fix
32 - go mod tidy
31 + golangci-lint run --fix $(GO_PACKAGES)
32
33 test:
35 - go test -v -race -coverprofile=coverage.out ./...
34 + go test -v -race -coverprofile=coverage.out $(GO_PACKAGES)
35
36 vuln:
38 - govulncheck ./...
37 + govulncheck $(GO_PACKAGES)
38
39 tidy:
40 go get -u ./...
go.mod
+1 -1
@@ -1,6 +1,6 @@
1 module gosuda.org/portal/v2
2
3 -go 1.26.0
3 +go 1.26.1
4
5 require (
6 github.com/aws/aws-sdk-go-v2 v1.41.1