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

Commit

Permalink
Upgrade golangci-lint and enable it when formatting (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 authored Apr 24, 2023
1 parent bee5590 commit 8291d1f
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 8291d1f

Please sign in to comment.