@@ -43,12 +43,7 @@ GOTAGSLIST := sqlite_unlock_notify sqlite_omit_load_extension
4343# e.g. make GOTAGSCUSTOM=msgtrace
4444GOTAGSLIST += ${GOTAGSCUSTOM}
4545
46- # If available, use gotestsum instead of 'go test'.
47- ifeq (, $(shell which gotestsum) )
48- export GOTESTCOMMAND =go test
49- else
50- export GOTESTCOMMAND =gotestsum --format pkgname --jsonfile testresults.json --
51- endif
46+ GOTESTCOMMAND := go tool -modfile=tool.mod gotestsum --format pkgname --jsonfile testresults.json --
5247
5348ifeq ($(OS_TYPE ) , darwin)
5449# M1 Mac--homebrew install location in /opt/homebrew
@@ -107,10 +102,13 @@ fix: build
107102 $(GOBIN ) /algofix * /
108103
109104modernize :
110- GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./...
105+ GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@v0.39.0 -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./...
106+
107+ lint :
108+ go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.1 run -c .golangci.yml
111109
112- lint : deps
113- $( GOBIN ) / golangci-lint run -c .golangci.yml
110+ warninglint : custom-golangci-lint
111+ ./custom- golangci-lint run -c .golangci-warnings .yml
114112
115113expectlint :
116114 cd test/e2e-go/cli/goal/expect && python3 expect_linter.py * .exp
@@ -140,7 +138,7 @@ cover:
140138prof :
141139 cd node && go test $(GOTAGS ) -cpuprofile=cpu.out -memprofile=mem.out -mutexprofile=mutex.out
142140
143- generate : deps
141+ generate :
144142 PATH=$(GOBIN ) :$$ PATH go generate ./...
145143
146144msgp : $(patsubst % ,% /msgp_gen.go,$(MSGP_GENERATE ) )
@@ -151,13 +149,13 @@ api:
151149logic :
152150 make -C data/transactions/logic
153151
154-
155- % /msgp_gen.go : deps ALWAYS
152+ MSGP := go run github.com/algorand/msgp@v1.1.62
153+ % /msgp_gen.go : ALWAYS
156154 @set +e; \
157- printf " msgp: $( @D) ..." ; \
158- $(GOBIN ) /msgp -file ./$(@D ) -o $@ -warnmask github.com/algorand/go-algorand > ./$@ .out 2>&1 ; \
155+ printf " $( MSGP ) $( @D) ..." ; \
156+ $(MSGP ) -file ./$(@D ) -o $@ -warnmask github.com/algorand/go-algorand > ./$@ .out 2>&1 ; \
159157 if [ " $$ ?" != " 0" ]; then \
160- printf " failed:\n$( GOBIN ) /msgp -file ./$( @D) -o $@ -warnmask github.com/algorand/go-algorand\n" ; \
158+ printf " failed:\n$( MSGP ) -file ./$( @D) -o $@ -warnmask github.com/algorand/go-algorand\n" ; \
161159 cat ./$@ .out; \
162160 rm ./$@ .out; \
163161 exit 1; \
231229 echo "OS_TYPE must be darwin for universal builds, skipping"
232230endif
233231
234- deps :
235- ./scripts/check_deps.sh
236-
237232# artifacts
238233
239234# Regenerate kmd swagger spec files
@@ -260,15 +255,15 @@ $(KMD_API_SWAGGER_SPEC): $(KMD_API_FILES) crypto/libs/$(OS_TYPE)/$(ARCH)/lib/lib
260255 touch $@ ; \
261256 fi
262257
263- $(KMD_API_SWAGGER_INJECT ) : deps $(KMD_API_SWAGGER_SPEC ) $(KMD_API_SWAGGER_SPEC ) .validated
258+ $(KMD_API_SWAGGER_INJECT ) : $(KMD_API_SWAGGER_SPEC ) $(KMD_API_SWAGGER_SPEC ) .validated
264259 ./daemon/kmd/lib/kmdapi/bundle_swagger_json.sh
265260
266261# generated files we should make sure we clean
267262GENERATED_FILES := \
268263 $(KMD_API_SWAGGER_INJECT ) \
269264 $(KMD_API_SWAGGER_SPEC ) $(KMD_API_SWAGGER_SPEC ) .validated
270265
271- rebuild_kmd_swagger : deps
266+ rebuild_kmd_swagger :
272267 rm -f $(GENERATED_FILES )
273268 # we need to invoke the make here since we want to ensure that the deletion and re-creating are sequential
274269 make $(KMD_API_SWAGGER_INJECT )
@@ -306,7 +301,7 @@ build-e2e: check-go-version crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a
306301 wait
307302 cp $(GOBIN ) /kmd $(GOBIN ) -race
308303
309- NONGO_BIN_FILES =$(GOBIN ) /find-nodes.sh $(GOBIN ) /update.sh $(GOBIN ) /COPYING $( GOBIN ) /ddconfig.sh
304+ NONGO_BIN_FILES =$(GOBIN ) /find-nodes.sh $(GOBIN ) /update.sh $(GOBIN ) /COPYING
310305
311306NONGO_BIN : $(NONGO_BIN_FILES )
312307
@@ -316,8 +311,6 @@ $(GOBIN)/update.sh: cmd/updater/update.sh
316311
317312$(GOBIN ) /COPYING : COPYING
318313
319- $(GOBIN ) /ddconfig.sh : scripts/ddconfig.sh
320-
321314$(GOBIN ) /% :
322315 cp -f $< $@
323316
@@ -415,14 +408,13 @@ dump: $(addprefix gen/,$(addsuffix /genesis.dump, $(NETWORKS)))
415408install : build
416409 scripts/dev_install.sh -p $(GOBIN )
417410
418- .PHONY : default fmt lint check_shell sanity cover prof deps build build-race build-e2e test fulltest shorttest clean cleango deploy node_exporter install % gen gen NONGO_BIN check-go-version rebuild_kmd_swagger universal libsodium modernize
411+ .PHONY : default fmt lint check_shell sanity cover prof build build-race build-e2e test fulltest shorttest clean cleango deploy node_exporter install % gen gen NONGO_BIN check-go-version rebuild_kmd_swagger universal libsodium modernize
419412
420413# ##### TARGETS FOR CICD PROCESS ######
421414include ./scripts/release/mule/Makefile.mule
422415
423416archive :
424417 aws s3 cp tmp/node_pkgs s3://algorand-internal/channel/$(CHANNEL ) /$(FULLBUILDNUMBER ) --recursive --exclude " *" --include " *$( FULLBUILDNUMBER) *"
425418
426- build_custom_linters :
419+ custom-golangci-lint : .custom-gcl.yml
427420 golangci-lint custom -v
428- ./custom-golangci-lint --version
0 commit comments