From 56295a67953694a0c40d30a7e8973df5531fef8a Mon Sep 17 00:00:00 2001 From: Daniel <24758309+leedaniil@users.noreply.github.com> Date: Mon, 27 Dec 2021 12:39:11 +0300 Subject: [PATCH] Turn on linter (#16855) --- .github/workflows/check.yml | 8 ++++---- .github/workflows/pr-ci.yml | 8 ++++---- internal/processor/service.go | 1 + internal/processor/updaters_auto.go | 1 + internal/processor/updaters_manual.go | 5 ++++- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a74789d3c..62bc0beb4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -19,8 +19,8 @@ jobs: - name: Run check run: go run ./cmd/main.go --config=./.github/assets.config.yaml --script=checker - # - name: Unit Test - # run: make test + - name: Unit Test + run: make test - # - name: Lint - # run: make lint \ No newline at end of file + - name: Lint + run: make lint \ No newline at end of file diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 07fc10cc4..32c4c42ec 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -23,8 +23,8 @@ jobs: - name: Run check run: go run ./cmd/main.go --config=./.github/assets.config.yaml --script=checker - # - name: Unit Test - # run: make test + - name: Unit Test + run: make test - # - name: Lint - # run: make lint \ No newline at end of file + - name: Lint + run: make lint \ No newline at end of file diff --git a/internal/processor/service.go b/internal/processor/service.go index 26d39b568..446d5dcc9 100644 --- a/internal/processor/service.go +++ b/internal/processor/service.go @@ -137,6 +137,7 @@ func (s *Service) GetUpdatersAuto() []Updater { } } +// nolint:godot func (s *Service) GetUpdatersManual() []Updater { return []Updater{ { diff --git a/internal/processor/updaters_auto.go b/internal/processor/updaters_auto.go index 5a6ead3c6..ec44c93b1 100644 --- a/internal/processor/updaters_auto.go +++ b/internal/processor/updaters_auto.go @@ -8,6 +8,7 @@ import ( "time" log "github.com/sirupsen/logrus" + fileLib "github.com/trustwallet/assets-go-libs/file" "github.com/trustwallet/assets-go-libs/image" "github.com/trustwallet/assets-go-libs/path" diff --git a/internal/processor/updaters_manual.go b/internal/processor/updaters_manual.go index 5c11f5523..0f47582dd 100644 --- a/internal/processor/updaters_manual.go +++ b/internal/processor/updaters_manual.go @@ -113,6 +113,7 @@ var ( PrimaryTokensSmartChain = []string{"WBNB", "BNB"} ) +// nolint:dupl func (s *Service) UpdateEthereumTokenlist() error { log.WithFields(log.Fields{ "limit_liquidity": UniswapMinLiquidity, @@ -194,6 +195,7 @@ func (s *Service) UpdatePolygonTokenlist() error { return rebuildTokenList(chain, pairs, PolygonSwapForceExclude) } +// nolint:dupl func (s *Service) UpdateSmartchainTokenlist() error { log.WithFields(log.Fields{ "limit_liquidity": PancakeSwapMinLiquidity, @@ -202,7 +204,8 @@ func (s *Service) UpdateSmartchainTokenlist() error { }).Debug("Retrieving pairs from PancakeSwap") tradingPairs, err := retrievePairs(PancakeSwapTradingPairsUrl, PancakeSwapTradingPairsQuery, - PancakeSwapMinLiquidity, PancakeSwapMinVol24, PancakeSwapMinTxCount24, PancakeSwapForceInclude, PrimaryTokensSmartChain) + PancakeSwapMinLiquidity, PancakeSwapMinVol24, PancakeSwapMinTxCount24, + PancakeSwapForceInclude, PrimaryTokensSmartChain) if err != nil { return err }