Skip to content

Commit 7c50eca

Browse files
authored
chore: Revert go 1 24 features (#1193)
* Revert "chore: use Go 1.24 tool for staticcheck and goimports (#1191)" This reverts commit 141c786. * Revert "chore: use Go 1.24 tool feature for Ginkgo (#1188)" This reverts commit bc682d5.
1 parent 3bb7cf4 commit 7c50eca

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

.github/workflows/focused-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ jobs:
1010
with:
1111
go-version: '1.23.6'
1212
- uses: actions/checkout@v4
13-
- run: go tool ginkgo unfocus && test -z "$(git status -s)"
13+
- run: go run github.com/onsi/ginkgo/v2/ginkgo unfocus && test -z "$(git status -s)"
1414

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test-units: ## run unit tests
4848
# Integration tests are relatively resource-hungry, so we tune down the number of processes that run in parallel
4949
.PHONY: test-integration
5050
test-integration: .pak-cache ## run integration tests
51-
PAK_BUILD_CACHE_PATH=$(PAK_CACHE) go tool ginkgo --procs 4 integrationtest/...
51+
PAK_BUILD_CACHE_PATH=$(PAK_CACHE) go run github.com/onsi/ginkgo/v2/ginkgo --procs 4 integrationtest/...
5252

5353
.pak-cache:
5454
mkdir -p $(PAK_CACHE)
@@ -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 tool goimports -l -d .)" ]; then \
110+
@@if [ -n "$$(go run golang.org/x/tools/cmd/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 tool staticcheck
119+
go list ./... | grep -v 'fakes$$' | xargs go run honnef.co/go/tools/cmd/staticcheck
120120

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

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

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

go.mod

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ require (
2828
github.com/zclconf/go-cty v1.16.2
2929
golang.org/x/crypto v0.33.0
3030
golang.org/x/net v0.35.0
31+
golang.org/x/tools v0.30.0
3132
gopkg.in/yaml.v3 v3.0.1
3233
gorm.io/driver/mysql v1.5.7
3334
gorm.io/driver/sqlite v1.5.7
3435
gorm.io/gorm v1.25.12
36+
honnef.co/go/tools v0.6.0
3537
)
3638

3739
require (
@@ -130,7 +132,6 @@ require (
130132
golang.org/x/sys v0.30.0 // indirect
131133
golang.org/x/text v0.22.0 // indirect
132134
golang.org/x/time v0.9.0 // indirect
133-
golang.org/x/tools v0.30.0 // indirect
134135
google.golang.org/api v0.219.0 // indirect
135136
google.golang.org/genproto v0.0.0-20250127172529-29210b9bc287 // indirect
136137
google.golang.org/genproto/googleapis/api v0.0.0-20250127172529-29210b9bc287 // indirect
@@ -139,12 +140,5 @@ require (
139140
google.golang.org/protobuf v1.36.4 // indirect
140141
gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0 // indirect
141142
gopkg.in/ini.v1 v1.67.0 // indirect
142-
honnef.co/go/tools v0.6.0 // indirect
143143
rsc.io/goversion v1.2.0 // indirect
144144
)
145-
146-
tool (
147-
github.com/onsi/ginkgo/v2/ginkgo
148-
golang.org/x/tools/cmd/goimports
149-
honnef.co/go/tools/cmd/staticcheck
150-
)

tools/tools.go

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

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

0 commit comments

Comments
 (0)