@@ -57,16 +57,16 @@ endef
57
57
# #########################
58
58
# High-level tasks definitions
59
59
# #########################
60
- lint : lint-go-all lint-imports lint- yaml lint-shell lint-commits lint-headers lint-mod lint-licenses-all
60
+ lint : lint-go-all lint-yaml lint-shell lint-commits lint-headers lint-mod lint-licenses-all
61
61
test : test-unit test-unit-race test-unit-bench
62
62
unit : test-unit test-unit-race test-unit-bench
63
- fix : fix-mod fix-imports fix- go-all
63
+ fix : fix-mod fix-go-all
64
64
65
65
# #########################
66
66
# Linting tasks
67
67
# #########################
68
68
lint-go :
69
- $(call title, $@ )
69
+ $(call title, $@ : $( GOOS ) )
70
70
@cd $(MAKEFILE_DIR ) \
71
71
&& golangci-lint run $(VERBOSE_FLAG_LONG ) ./...
72
72
$(call footer, $@ )
@@ -80,12 +80,6 @@ lint-go-all:
80
80
&& GOOS=windows make lint-go
81
81
$(call footer, $@ )
82
82
83
- lint-imports :
84
- $(call title, $@ )
85
- @cd $(MAKEFILE_DIR ) \
86
- && goimports-reviser -recursive -list-diff -set-exit-status -output stdout -company-prefixes " $( ORG_PREFIXES) " ./...
87
- $(call footer, $@ )
88
-
89
83
lint-yaml :
90
84
$(call title, $@ )
91
85
@cd $(MAKEFILE_DIR ) \
@@ -115,10 +109,15 @@ lint-mod:
115
109
&& go mod tidy --diff
116
110
$(call footer, $@ )
117
111
112
+ # FIXME: go-licenses cannot find LICENSE from root of repo when submodule is imported:
113
+ # https://github.com/google/go-licenses/issues/186
114
+ # This is impacting gotest.tools
118
115
lint-licenses :
119
- $(call title, $@ )
116
+ $(call title, $@ : $( GOOS ) )
120
117
@cd $(MAKEFILE_DIR ) \
121
- && ./hack/make-lint-licenses.sh
118
+ && go-licenses check --include_tests --allowed_licenses=Apache-2.0,BSD-2-Clause,BSD-3-Clause,MIT,MPL-2.0 \
119
+ --ignore gotest.tools \
120
+ ./...
122
121
$(call footer, $@ )
123
122
124
123
lint-licenses-all :
@@ -134,7 +133,7 @@ lint-licenses-all:
134
133
# Automated fixing tasks
135
134
# #########################
136
135
fix-go :
137
- $(call title, $@ )
136
+ $(call title, $@ : $( GOOS ) )
138
137
@cd $(MAKEFILE_DIR ) \
139
138
&& golangci-lint run --fix
140
139
$(call footer, $@ )
@@ -148,12 +147,6 @@ fix-go-all:
148
147
&& GOOS=windows make fix-go
149
148
$(call footer, $@ )
150
149
151
- fix-imports :
152
- $(call title, $@ )
153
- @cd $(MAKEFILE_DIR ) \
154
- && goimports-reviser -company-prefixes $(ORG_PREFIXES ) ./...
155
- $(call footer, $@ )
156
-
157
150
fix-mod :
158
151
$(call title, $@ )
159
152
@cd $(MAKEFILE_DIR ) \
@@ -171,18 +164,16 @@ up:
171
164
# #########################
172
165
install-dev-tools :
173
166
$(call title, $@ )
174
- # golangci: v1.64.5
175
- # git-validation: main from 2023/11
176
- # ltag: v0.2.5
177
- # go-licenses: v2.0.0-alpha.1
178
- # goimports-reviser: v3.9.0
167
+ # golangci: v2.0.2 (2024-03-26)
168
+ # git-validation: main (2025-02-25)
169
+ # ltag: main (2025-03-04)
170
+ # go-licenses: v2.0.0-alpha.1 (2024-06-27)
179
171
@cd $(MAKEFILE_DIR ) \
180
- && go install github.com/golangci/golangci-lint/cmd/golangci-lint@0a603e49e5e9870f5f9f2035bcbe42cd9620a9d5 \
181
- && go install github.com/vbatts/git-validation@679e5cad8c50f1605ab3d8a0a947aaf72fb24c07 \
182
- && go install github.com/kunalkushwaha/ltag@b0cfa33e4cc9383095dc584d3990b62c95096de0 \
183
- && go install github.com/google/go-licenses/v2@d01822334fba5896920a060f762ea7ecdbd086e8 \
184
- && go install github.com/incu6us/goimports-reviser/v3@698f92d226d50a01731ca8551993ebc1bb7fc788
185
- @echo " Remember to add GOROOT/bin to your path"
172
+ && go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@2b224c2cf4c9f261c22a16af7f8ca6408467f338 \
173
+ && go install github.com/vbatts/git-validation@7b60e35b055dd2eab5844202ffffad51d9c93922 \
174
+ && go install github.com/containerd/ltag@66e6a514664ee2d11a470735519fa22b1a9eaabd \
175
+ && go install github.com/google/go-licenses/v2@d01822334fba5896920a060f762ea7ecdbd086e8
176
+ @echo " Remember to add \$ $HOME /go/bin to your path"
186
177
$(call footer, $@ )
187
178
188
179
# #########################
@@ -200,7 +191,7 @@ test-unit-bench:
200
191
201
192
test-unit-race :
202
193
$(call title, $@ )
203
- @go test $(VERBOSE_FLAG ) $(MAKEFILE_DIR ) /... -race
194
+ @CGO_ENABLED=1 go test $(VERBOSE_FLAG ) $(MAKEFILE_DIR ) /... -race
204
195
$(call footer, $@ )
205
196
206
197
.PHONY : \
@@ -210,6 +201,6 @@ test-unit-race:
210
201
up \
211
202
unit \
212
203
install-dev-tools \
213
- lint-commits lint-go lint-go-all lint-headers lint-imports lint- licenses lint-licenses-all lint-mod lint-shell lint-yaml \
214
- fix-go fix-go-all fix-imports fix- mod \
215
- test-unit test-unit-race test-unit-bench
204
+ lint-commits lint-go lint-go-all lint-headers lint-licenses lint-licenses-all lint-mod lint-shell lint-yaml \
205
+ fix-go fix-go-all fix-mod \
206
+ test-unit test-unit-race test-unit-bench
0 commit comments