@@ -9,7 +9,7 @@ bins: temporal-server temporal-cassandra-tool temporal-sql-tool tdbg
9
9
all : update-tools clean proto bins check test
10
10
11
11
# Used by Buildkite.
12
- ci-build : bins build-tests update-tools shell-check check proto go-generate gomodtidy ensure-no-changes
12
+ ci-build : bins build-tests ci- update-tools shell-check copyright- check proto go-generate gomodtidy ensure-no-changes
13
13
14
14
# Delete all build artifacts
15
15
clean : clean-bins clean-test-results
@@ -108,13 +108,13 @@ SQL_PASSWORD ?= temporal
108
108
INTEGRATION_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT ) /common/persistence/...,$(MODULE_ROOT ) /tools/..."
109
109
FUNCTIONAL_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT ) /client/...,$(MODULE_ROOT ) /common/...,$(MODULE_ROOT ) /service/...,$(MODULE_ROOT ) /temporal/...,$(MODULE_ROOT ) /tools/..."
110
110
# #### Tools #####
111
- update-checkers :
112
- @printf $(COLOR ) " Install/update check tools ..."
111
+ update-goimports :
112
+ @printf $(COLOR ) " Install/update goimports ..."
113
113
@go install golang.org/x/tools/cmd/goimports@latest
114
- @go install github.com/googleapis/api-linter/cmd/api-linter@v1.32.3
115
- @go install github.com/bufbuild/buf/cmd/buf@v1.6.0
116
- @go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
117
114
115
+ update-linters :
116
+ @printf $(COLOR ) " Install/update linters..."
117
+ @go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1
118
118
119
119
update-mockgen :
120
120
@printf $(COLOR ) " Install/update mockgen tool..."
@@ -125,6 +125,11 @@ update-proto-plugins:
125
125
@go install -modfile build/go.mod github.com/temporalio/gogo-protobuf/protoc-gen-gogoslick
126
126
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
127
127
128
+ update-proto-linters :
129
+ @printf $(COLOR ) " Install/update proto linters..."
130
+ @go install github.com/googleapis/api-linter/cmd/api-linter@v1.32.3
131
+ @go install github.com/bufbuild/buf/cmd/buf@v1.6.0
132
+
128
133
update-tctl :
129
134
@printf $(COLOR ) " Install/update tctl..."
130
135
@go install github.com/temporalio/tctl/cmd/tctl@latest
@@ -133,7 +138,10 @@ update-ui:
133
138
@printf $(COLOR ) " Install/update temporal ui-server..."
134
139
@go install github.com/temporalio/ui-server/cmd/server@latest
135
140
136
- update-tools : update-checkers update-mockgen update-proto-plugins
141
+ update-tools : update-goimports update-linters update-mockgen update-proto-plugins update-proto-linters
142
+
143
+ # update-linters is not included because in CI linters are run by github actions.
144
+ ci-update-tools : update-goimports update-mockgen update-proto-plugins update-proto-linters
137
145
138
146
# #### Proto #####
139
147
$(PROTO_OUT ) :
@@ -224,8 +232,8 @@ copyright:
224
232
@go run ./cmd/tools/copyright/licensegen.go
225
233
226
234
lint :
227
- @printf $(COLOR ) " Run linter ..."
228
- @golangci-lint run
235
+ @printf $(COLOR ) " Run linters ..."
236
+ @golangci-lint run --verbose --timeout 10m --fix=false --new-from-rev=HEAD~ --config=.golangci.yml
229
237
230
238
api-linter :
231
239
@printf $(COLOR ) " Run api-linter..."
@@ -247,7 +255,7 @@ shell-check:
247
255
@printf $(COLOR ) " Run shellcheck for script files..."
248
256
@shellcheck $(ALL_SCRIPTS )
249
257
250
- check : copyright-check
258
+ check : copyright-check lint shell-check
251
259
252
260
# #### Tests #####
253
261
clean-test-results :
0 commit comments