Skip to content

Commit

Permalink
build: don't reinstall golangci-lint if already installed (#21662)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio authored Sep 12, 2024
1 parent 88cfebe commit 979f885
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/build/linting.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
golangci_version=v1.60.1
golangci_installed_version=$(shell golangci-lint version --format short 2>/dev/null)

#? setup-pre-commit: Set pre-commit git hook
setup-pre-commit:
Expand All @@ -9,8 +10,10 @@ setup-pre-commit:

#? lint-install: Install golangci-lint
lint-install:
ifneq ($(golangci_installed_version),$(golangci_version))
@echo "--> Installing golangci-lint $(golangci_version)"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
endif

#? lint: Run golangci-lint
lint:
Expand Down

0 comments on commit 979f885

Please sign in to comment.