Skip to content

Commit

Permalink
fix: use version of golangci-lint already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Sep 30, 2024
1 parent c4a81df commit 154a1e7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -326,23 +326,20 @@ benchmark:
###############################################################################

golangci_lint_cmd=golangci-lint
golangci_version=v1.56.2
golangci_version=v1.61.0

lint:
@echo "--> Running linter"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@$(golangci_lint_cmd) run --timeout=10m
@$(golangci_lint_cmd) run --timeout=10m --verbose

lint-fix:
@echo "--> Running linter"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@$(golangci_lint_cmd) run --fix --out-format=tab --issues-exit-code=0

.PHONY: lint lint-fix

format:
@go install mvdan.cc/gofumpt@latest
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs gofumpt -w -l
golangci-lint run --fix
.PHONY: format
Expand Down

0 comments on commit 154a1e7

Please sign in to comment.