Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Upgrade golangci-lint and enable it when formatting #646

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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)
Expand Down