From b49a1926e261288a1d2926e229377b60b22643f2 Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Mon, 24 Apr 2023 10:20:58 +0800 Subject: [PATCH] Upgrade golangci-lint and enable it when formatting --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2924c89e7..c70b33ef0 100644 --- a/Makefile +++ b/Makefile @@ -133,8 +133,7 @@ go/mod: .PHONY: fmt fmt: $(BIN)/golangci-lint $(BIN)/buf $(BIN)/tk ## Automatically fix some lint errors git ls-files '*.go' | grep -v 'vendor/' | xargs gofmt -s -w - # TODO: Reenable once golangci-lint support go 1.18 properly - # $(BIN)/golangci-lint run --fix + $(BIN)/golangci-lint run --fix cd api/ && $(BIN)/buf format -w . cd pkg && $(BIN)/buf format -w . $(BIN)/tk fmt ./operations/phlare/jsonnet/ tools/monitoring/ @@ -224,7 +223,7 @@ $(BIN)/buf: Makefile $(BIN)/golangci-lint: Makefile @mkdir -p $(@D) - GOBIN=$(abspath $(@D)) $(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2 + GOBIN=$(abspath $(@D)) $(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2 $(BIN)/protoc-gen-go: Makefile go.mod @mkdir -p $(@D)