Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

build: move linter build tags into Makefile to fix golangci-lint

Nick Craig-Woodb05da61c82f4
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