From 6b8fe916cece2f5da28e51bc69bdbb6b8ab03b5b Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 18 Jan 2022 19:27:22 -0800 Subject: [PATCH] Pass patch file to golangci-lint, align with CI --- .golangci.yml | 1 - Makefile | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d6ca265145..52c064e17c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -64,7 +64,6 @@ linters: issues: max-issues-per-linter: 0 max-same-issues: 0 - new: true exclude-use-default: false run: timeout: 5m diff --git a/Makefile b/Makefile index 8795d3f0db..92727f5b81 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,8 @@ all: test lint verify-codegen update-crds debian-image .PHONY: lint lint: ## Run linter - docker run --pull always --rm -v $(shell pwd):/kubernetes-ingress -w /kubernetes-ingress -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run -v + @git fetch + docker run --pull always --rm -v $(shell pwd):/kubernetes-ingress -w /kubernetes-ingress -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest git diff -p origin/master > /tmp/diff.patch && golangci-lint --color always run -v --new-from-patch=/tmp/diff.patch .PHONY: test test: ## Run tests