@ -62,6 +62,7 @@ SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v2.1.5
GOLANGCI_LINT_VERSION ?= v2.1.5
GOLANGCI_FMT_OPTS ?=
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
# windows isn't included here because of the path separator being different.
i f e q ( $( GOHOSTOS ) , $( filter $ ( GOHOSTOS ) ,linux darwin ) )
i f e q ( $( GOHOSTOS ) , $( filter $ ( GOHOSTOS ) ,linux darwin ) )
@ -156,9 +157,13 @@ $(GOTEST_DIR):
@mkdir -p $@
@mkdir -p $@
.PHONY : common -format
.PHONY : common -format
common-format :
common-format : $( GOLANGCI_LINT )
@echo ">> formatting code"
@echo ">> formatting code"
$( GO) fmt $( pkgs)
$( GO) fmt $( pkgs)
i f d e f G O L A N G C I _ L I N T
@echo ">> formatting code with golangci-lint"
$( GOLANGCI_LINT) fmt $( GOLANGCI_FMT_OPTS)
e n d i f
.PHONY : common -vet
.PHONY : common -vet
common-vet :
common-vet :