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: add gometalinter and gometalinter_install Makefile targets

Nick Craig-Wood790a8a9aed3e
diff --git a/.gometalinter.json b/.gometalinter.json
new file mode 100644
index 000000000..4cd25d5ba
--- /dev/null
+++ b/.gometalinter.json
@@ -0,0 +1,14 @@
+{
+ "Enable": [
+ "deadcode",
+ "errcheck",
+ "goimports",
+ "golint",
+ "ineffassign",
+ "structcheck",
+ "varcheck",
+ "vet"
+ ],
+ "EnableGC": true,
+ "Vendor": true
+}
diff --git a/Makefile b/Makefile
index 2835626b2..366115625 100644
--- a/Makefile
+++ b/Makefile
@@ -56,6 +56,16 @@ else
@echo Skipping source quality tests as version of go too old
endif
+gometalinter_install:
+ go get -u github.com/alecthomas/gometalinter
+ gometalinter --install --update
+
+# We aren't using gometalinter as the default linter yet because
+# 1. it doesn't support build tags: https://github.com/alecthomas/gometalinter/issues/275
+# 2. can't get -printfuncs working with the vet linter
+gometalinter:
+ gometalinter ./...
+
# Get the build dependencies
build_dep:
ifdef FULL_TESTS