From b05da61c82f46041925363531fcc352ed6822a95 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 12 Apr 2019 15:48:36 +0100 Subject: [PATCH] build: move linter build tags into Makefile to fix golangci-lint --- .golangci.yml | 4 ---- Makefile | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 20353fd2e..8b8e9bd73 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,9 +1,5 @@ # golangci-lint configuration options -run: - build-tags: - - cmount - linters: enable: - deadcode diff --git a/Makefile b/Makefile index e3c454a2e..84df4dbf3 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ BETA_UPLOAD := $(BETA_UPLOAD_ROOT)/$(BETA_PATH) # Pass in GOTAGS=xyz on the make command line to set build tags ifdef GOTAGS BUILDTAGS=-tags "$(GOTAGS)" +LINTTAGS=--build-tags "$(GOTAGS)" endif .PHONY: rclone vars version @@ -64,7 +65,7 @@ check: rclone @# see: https://github.com/golangci/golangci-lint/issues/204 @echo "-- START CODE QUALITY REPORT -------------------------------" @go vet $(BUILDTAGS) -printfuncs Debugf,Infof,Logf,Errorf ./... - @golangci-lint run ./... + @golangci-lint run $(LINTTAGS) ./... @echo "-- END CODE QUALITY REPORT ---------------------------------" # Get the build dependencies