mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 23:16:52 +00:00
linters: Add modernise tool check and fix issues (#2012)
* linters: Add modernise tool check and fix issues * engine: Simplify exch.SetDefaults call and remove localWG * CI: Revert config versions lint workflow
This commit is contained in:
6
Makefile
6
Makefile
@@ -11,7 +11,7 @@ DRIVER ?= psql
|
||||
RACE_FLAG := $(if $(NO_RACE_TEST),,-race)
|
||||
CONFIG_FLAG = $(if $(CONFIG),-config $(CONFIG),)
|
||||
|
||||
.PHONY: all lint lint_docker check test build install fmt gofumpt update_deps
|
||||
.PHONY: all lint lint_docker check test build install fmt gofumpt update_deps modernise
|
||||
|
||||
all: check build
|
||||
|
||||
@@ -41,6 +41,10 @@ gofumpt:
|
||||
@command -v gofumpt >/dev/null 2>&1 || go install mvdan.cc/gofumpt@latest
|
||||
$(GOFUMPTBIN) -l -w $(GO_FILES_TO_FORMAT)
|
||||
|
||||
modernise:
|
||||
@command -v modernize >/dev/null 2>&1 || go install golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest
|
||||
modernize -test ./...
|
||||
|
||||
update_deps:
|
||||
go mod verify
|
||||
go mod tidy
|
||||
|
||||
Reference in New Issue
Block a user