diff --git a/tools/make/lint.mk b/tools/make/lint.mk index 46f746b6cf..c4f13abdfc 100644 --- a/tools/make/lint.mk +++ b/tools/make/lint.mk @@ -68,8 +68,11 @@ lint.shellcheck: $(tools/shellcheck) @$(LOG_TARGET) $(tools/shellcheck) tools/hack/*.sh +.PHONY: fix-golint +fix-golint: lint.fix-golint ## Run golangci-lint and gci to automatically fix code lint issues + .PHONY: lint.fix-golint -lint.fix-golint: ## Run all linter of code sources and fix the issues. +lint.fix-golint: @$(LOG_TARGET) $(MAKE) lint.golint GOLANGCI_LINT_FLAGS="--fix" find . -name "*.go" | xargs go tool gci write --skip-generated -s Standard -s Default -s "Prefix(github.com/envoyproxy/gateway)"