forked from thrasher-corp/gocryptotrader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: add new recipes and linter features (thrasher-corp#244)
* Makefile: add new recipes and linter features * expand linter coverage and fix issues * Update makefile * address PR nitterinos
- Loading branch information
Showing
85 changed files
with
306 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,50 @@ | ||
LDFLAGS = -ldflags "-w -s" | ||
GCTPKG = github.com/thrasher-/gocryptotrader | ||
LINTPKG = gopkg.in/alecthomas/gometalinter.v2 | ||
LINTBIN = $(GOPATH)/bin/gometalinter.v2 | ||
ENABLELLL = false | ||
LINTOPTS = \ | ||
--disable-all \ | ||
--enable=gofmt \ | ||
--enable=vet \ | ||
--enable=vetshadow \ | ||
--enable=misspell \ | ||
--enable=golint \ | ||
--enable=ineffassign \ | ||
--enable=goconst \ | ||
--enable=structcheck \ | ||
--enable=unparam \ | ||
--enable=gosimple \ | ||
--enable=unconvert | ||
ifeq ($(ENABLELLL), true) | ||
LINTOPTS += \ | ||
--enable=lll \ | ||
--line-length=80 | ||
endif | ||
LINTOPTS += \ | ||
--deadline=5m ./... | \ | ||
grep -v 'ALL_CAPS\|OP_' 2>&1 | \ | ||
tee /dev/stderr | ||
|
||
get: | ||
dep ensure | ||
GO111MODULE=on go get $(GCTPKG) | ||
|
||
linter: | ||
GO111MODULE=on go get $(GCTPKG) | ||
GO111MODULE=off go get -u $(LINTPKG) | ||
$(LINTBIN) --install | ||
test -z "$$($(LINTBIN) $(LINTOPTS))" | ||
|
||
check: linter test | ||
|
||
test: | ||
go test -race -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
build: | ||
go build . | ||
GO111MODULE=on go build $(LDFLAGS) | ||
|
||
install: | ||
go install | ||
GO111MODULE=on go install $(LDFLAGS) | ||
|
||
fmt: | ||
gofmt -l -w -s $(shell find . -type f -name '*.go') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.