From 3a9d356c9dcc9c105690c6710fa145a85071d87a Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 20 Mar 2020 14:28:48 -0400 Subject: [PATCH] golangci-lint: Update --new-from-rev option to check only newly added commits (#8923) * golangci-lint: Update --new-from-rev option to check only code added in the latest commit Co-authored-by: Adrien Delorme --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 440e5631e..efd52658d 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ lint: install-lint-deps ## Lint Go code ci-lint: install-lint-deps ## On ci only lint newly added Go source files @echo "==> Running linter on newly added Go source files..." - GO111MODULE=on golangci-lint run --new-from-rev=origin/master ./... + GO111MODULE=on golangci-lint run --new-from-rev=`git merge-base master HEAD` ./... fmt: ## Format Go code