mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 08:23:47 +01:00
build: move linter build tags into Makefile to fix golangci-lint
This commit is contained in:
parent
41f01da625
commit
b05da61c82
@ -1,9 +1,5 @@
|
|||||||
# golangci-lint configuration options
|
# golangci-lint configuration options
|
||||||
|
|
||||||
run:
|
|
||||||
build-tags:
|
|
||||||
- cmount
|
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- deadcode
|
- deadcode
|
||||||
|
3
Makefile
3
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
|
# Pass in GOTAGS=xyz on the make command line to set build tags
|
||||||
ifdef GOTAGS
|
ifdef GOTAGS
|
||||||
BUILDTAGS=-tags "$(GOTAGS)"
|
BUILDTAGS=-tags "$(GOTAGS)"
|
||||||
|
LINTTAGS=--build-tags "$(GOTAGS)"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: rclone vars version
|
.PHONY: rclone vars version
|
||||||
@ -64,7 +65,7 @@ check: rclone
|
|||||||
@# see: https://github.com/golangci/golangci-lint/issues/204
|
@# see: https://github.com/golangci/golangci-lint/issues/204
|
||||||
@echo "-- START CODE QUALITY REPORT -------------------------------"
|
@echo "-- START CODE QUALITY REPORT -------------------------------"
|
||||||
@go vet $(BUILDTAGS) -printfuncs Debugf,Infof,Logf,Errorf ./...
|
@go vet $(BUILDTAGS) -printfuncs Debugf,Infof,Logf,Errorf ./...
|
||||||
@golangci-lint run ./...
|
@golangci-lint run $(LINTTAGS) ./...
|
||||||
@echo "-- END CODE QUALITY REPORT ---------------------------------"
|
@echo "-- END CODE QUALITY REPORT ---------------------------------"
|
||||||
|
|
||||||
# Get the build dependencies
|
# Get the build dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user