mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
golangci-lint/CI: Bump versions and introduce new linters (#798)
* golangci-lint/CI: Bump versions
Fix remaining linter issues
* Specifically set AppVeyor version
* Fix the infamous typos 👀
* Add go env cmd to AppVeyor
* Add go version cmd to AppVeyor
* Specify AppVeyor image, adjust linters
* Update go get to go install due to deprecation
* Bump golangci-lint timeout time for AppVeyor
* Change NW contract to NQ
* Address nitters
* GetRandomPair -> Pair{}
* Address nits
* Address time nitterinos plus additional tweaks
* More time inception upgrades!
* Bending time and space
This commit is contained in:
18
Makefile
18
Makefile
@@ -1,6 +1,6 @@
|
||||
LDFLAGS = -ldflags "-w -s"
|
||||
GCTPKG = github.com/thrasher-corp/gocryptotrader
|
||||
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.31.0
|
||||
LINTPKG = github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.1
|
||||
LINTBIN = $(GOPATH)/bin/golangci-lint
|
||||
GCTLISTENPORT=9050
|
||||
GCTPROFILERLISTENPORT=8085
|
||||
@@ -14,11 +14,11 @@ CONFIG_FLAG = $(if $(CONFIG),-config $(CONFIG),)
|
||||
all: check build
|
||||
|
||||
get:
|
||||
GO111MODULE=on go get $(GCTPKG)
|
||||
go install $(GCTPKG)
|
||||
|
||||
linter:
|
||||
GO111MODULE=on go get $(GCTPKG)
|
||||
GO111MODULE=on go get $(LINTPKG)
|
||||
go install $(GCTPKG)
|
||||
go install $(LINTPKG)
|
||||
test -z "$$($(LINTBIN) run --verbose | tee /dev/stderr)"
|
||||
|
||||
check: linter test
|
||||
@@ -31,19 +31,19 @@ else
|
||||
endif
|
||||
|
||||
build:
|
||||
GO111MODULE=on go build $(LDFLAGS)
|
||||
go build $(LDFLAGS)
|
||||
|
||||
install:
|
||||
GO111MODULE=on go install $(LDFLAGS)
|
||||
go install $(LDFLAGS)
|
||||
|
||||
fmt:
|
||||
gofmt -l -w -s $(shell find . -type f -name '*.go')
|
||||
|
||||
update_deps:
|
||||
GO111MODULE=on go mod verify
|
||||
GO111MODULE=on go mod tidy
|
||||
go mod verify
|
||||
go mod tidy
|
||||
rm -rf vendor
|
||||
GO111MODULE=on go mod vendor
|
||||
go mod vendor
|
||||
|
||||
.PHONY: profile_heap
|
||||
profile_heap:
|
||||
|
||||
Reference in New Issue
Block a user