Skip to content

Commit

Permalink
build: move linter build tags into Makefile to fix golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Apr 12, 2019
1 parent 41f01da commit b05da61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# golangci-lint configuration options

run:
build-tags:
- cmount

linters:
enable:
- deadcode
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b05da61

Please sign in to comment.