Skip to content

Commit 080b959

Browse files
committed
chore: use Go 1.24 tool for staticcheck and goimports
1 parent 3fc2184 commit 080b959

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ checkformat: ## Checks that the code is formatted correctly
107107
fi
108108

109109
checkimports: ## Checks that imports are formatted correctly
110-
@@if [ -n "$$(go run golang.org/x/tools/cmd/goimports -l -d .)" ]; then \
110+
@@if [ -n "$$(go tool goimports -l -d .)" ]; then \
111111
echo "goimports check failed: run 'make format'"; \
112112
exit 1; \
113113
fi
@@ -116,14 +116,14 @@ vet: ## Runs go vet
116116
go vet ./...
117117

118118
staticcheck: ## Runs staticcheck
119-
go list ./... | grep -v 'fakes$$' | xargs go run honnef.co/go/tools/cmd/staticcheck
119+
go list ./... | grep -v 'fakes$$' | xargs go tool staticcheck
120120

121121
###### Format #################################################################
122122

123123
.PHONY: format
124124
format: ## format the source
125125
gofmt -s -e -l -w .
126-
go run golang.org/x/tools/cmd/goimports -l -w .
126+
go tool goimports -l -w .
127127

128128
###### Image ##################################################################
129129

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,8 @@ require (
142142
gopkg.in/ini.v1 v1.67.0 // indirect
143143
rsc.io/goversion v1.2.0 // indirect
144144
)
145+
146+
tool (
147+
golang.org/x/tools/cmd/goimports
148+
honnef.co/go/tools/cmd/staticcheck
149+
)

tools/tools.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
_ "github.com/google/gops"
88
_ "github.com/maxbrunsfeld/counterfeiter/v6"
99
_ "github.com/onsi/ginkgo/v2/ginkgo"
10-
_ "golang.org/x/tools/cmd/goimports"
11-
_ "honnef.co/go/tools/cmd/staticcheck"
1210
)
1311

1412
// This file imports packages that are used when running go generate, or used

0 commit comments

Comments
 (0)