This repository was archived by the owner on Mar 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 2525
2626 - name : Run linters
2727 run : make lint
28-
29- - name : golangci-lint
30- uses : golangci/golangci-lint-action@v3
31- with :
32- version : latest
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ include Makefile.vars.mk
1717# Optional kind module
1818-include kind/kind.mk
1919
20+ golangci_bin = $(go_bin ) /golangci-lint
21+
2022.PHONY : help
2123help : # # Show this help
2224 @grep -E -h ' \s##\s' $(MAKEFILE_LIST ) | sort | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
@@ -49,7 +51,11 @@ vet: ## Run 'go vet' against code
4951 go vet ./...
5052
5153.PHONY : lint
52- lint : fmt generate vet git-diff # # All-in-one linting
54+ lint : generate fmt golangci-lint git-diff # # All-in-one linting
55+
56+ .PHONY : golangci-lint
57+ golangci-lint : $(golangci_bin ) # # Run golangci linters
58+ $(golangci_bin ) run --timeout 5m --out-format colored-line-number ./...
5359
5460.PHONY : git-diff
5561git-diff :
@@ -64,3 +70,6 @@ generate: ## Generate additional code and artifacts
6470clean : kind-clean # # Cleans local build artifacts
6571 docker rmi $(CONTAINER_IMG ) || true
6672 rm -rf docs/node_modules $(docs_out_dir ) dist .cache $(WORK_DIR )
73+
74+ $(golangci_bin ) : | $(go_bin )
75+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b " $( go_bin) "
You can’t perform that action at this time.
0 commit comments