Skip to content

Commit

Permalink
Upgrade golangci-lint and enable it when formatting (grafana/phlare#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-rustin committed Apr 24, 2023
1 parent 6129511 commit 45623b5
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit 45623b5

Please sign in to comment.