Skip to content

Commit d988c82

Browse files
howardjohnSteven Dake
authored and
Steven Dake
committed
Workaround nondeterministic linting (istio#18579)
See issue golangci/golangci-lint#840 A low cost fix here is to run `fmt` as part of the gen, which will then be checked by gencheck. Also tidy up the tidy-go target usage a bit.
1 parent 6b78cd8 commit d988c82

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Makefile.core.mk

+2-3
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,7 @@ precommit: format lint
324324

325325
format: fmt
326326

327-
fmt: format-go format-python
328-
go mod tidy
327+
fmt: format-go format-python tidy-go
329328

330329
# Build with -i to store the build caches into $GOPATH/pkg
331330
buildcache:
@@ -385,7 +384,7 @@ go-gen:
385384
@go build -o /tmp/bin/mixgen "${REPO_ROOT}/mixer/tools/mixgen/main.go"
386385
@PATH=${PATH}:/tmp/bin go generate ./...
387386

388-
gen: go-gen tidy-go mirror-licenses update-crds
387+
gen: go-gen mirror-licenses format update-crds
389388

390389
gen-check: gen check-clean-repo
391390

0 commit comments

Comments
 (0)