From 5d68d77b1ec71e431f08123b0cc4c2da6dd51107 Mon Sep 17 00:00:00 2001 From: Bernd Verst Date: Tue, 2 Jul 2024 11:39:44 -0700 Subject: [PATCH] Update linter command to support diff linting Signed-off-by: Bernd Verst --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index bb05248d64..cbbcfa9641 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,12 @@ test: ################################################################################ .PHONY: lint lint: verify-linter-installed verify-linter-version +ifdef LINT_BASE + @echo "LINT_BASE is set to "$(LINT_BASE)". Linter will only check diff." + $(GOLANGCI_LINT) run --timeout=20m --new-from-rev $(shell git rev-parse $(LINT_BASE)) +else $(GOLANGCI_LINT) run --timeout=20m +endif ################################################################################ # Target: modtidy-all #