Move golangci-lint configuration out of Makefile

Add 2m deadline; similar to containerd, recent issues with golangci-lint
taking more than 1 minute (seen in recent containerd/cri PRs as well).

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes 2019-09-19 09:23:12 -04:00
parent 9d60f9c56e
commit 1e3cd5b052
No known key found for this signature in database
GPG Key ID: 0F386284C03A1162
2 changed files with 23 additions and 1 deletions

22
.golangci.yml Normal file
View File

@ -0,0 +1,22 @@
linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
- goimports
- golint
- ineffassign
- vet
- unused
- misspell
disable:
- errcheck
run:
deadline: 2m
skip-dirs:
- integration
skip-files:
- ".*_test.go"

View File

@ -55,7 +55,7 @@ version: ## print current cri plugin release version
lint:
@echo "$(WHALE) $@"
golangci-lint run --skip-files .*_test.go --skip-dirs='(integration)'
golangci-lint run
gofmt:
@echo "$(WHALE) $@"