Turn on linter (#16855)

This commit is contained in:
Daniel 2021-12-27 12:39:11 +03:00 committed by GitHub
parent 6db2704406
commit 56295a6795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 9 deletions

View File

@ -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
- name: Lint
run: make lint

View File

@ -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
- name: Lint
run: make lint

View File

@ -137,6 +137,7 @@ func (s *Service) GetUpdatersAuto() []Updater {
}
}
// nolint:godot
func (s *Service) GetUpdatersManual() []Updater {
return []Updater{
{

View File

@ -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"

View File

@ -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
}