-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gocritic: importShadow rule doesn't appear to work #5672
Labels
bug
Something isn't working
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Details from running gocritic manually: $ gocritic check -enable importShadow ./...
./backtester\engine\setup.go:639:60: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/strategies/base' package 'base'
./backtester\engine\setup.go:932:49: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/strategies/base' package 'base'
./backtester\eventhandlers\strategies\binancecashandcarry\binancecashandcarry.go:128:38: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/backtester/eventhandlers/portfolio/holdings' package 'holdings'
./backtester\eventhandlers\strategies\rsi\rsi.go:178:39: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/backtester/data' package 'data'
./backtester\eventhandlers\strategies\top2bottom2\top2bottom2.go:254:39: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/backtester/data' package 'data'
./backtester\funding\item.go:95:54: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./cmd\exchange_template\exchange_template.go:261:3: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/file' package 'file'
./cmd\exchange_wrapper_issues\main.go:293:65: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/config' package 'config'
./cmd\exchange_wrapper_issues\main.go:1046:17: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/config' package 'config'
./cmd\gctcli\commands.go:2888:16: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./communications\telegram\telegram.go:94:6: importShadow: shadow of imported package 'errors'
./communications\telegram\telegram.go:255:2: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/encoding/json' package 'json'
./database\repository\script\script.go:18:82: importShadow: shadow of imported package 'time'
./database\repository\trade\trade.go:220:16: importShadow: shadow of imported from 'github.com/gofrs/uuid' package 'uuid'
./database\repository\trade\trade.go:236:22: importShadow: shadow of imported from 'github.com/gofrs/uuid' package 'uuid'
./database\repository\trade\trade.go:265:24: importShadow: shadow of imported from 'github.com/gofrs/uuid' package 'uuid'
./engine\order_manager.go:947:36: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges' package 'exchange'
./engine\portfolio_manager.go:336:48: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges' package 'exchange'
./exchanges\exchange.go:1013:38: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/request' package 'request'
./exchanges\exchange.go:1013:47: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/config' package 'config'
./exchanges\exchange.go:1253:32: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/key' package 'key'
./exchanges\exchange.go:1283:28: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/key' package 'key'
./exchanges\exchange_test.go:478:2: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/futures' package 'futures'
./exchanges\binance\binance.go:1130:69: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\binance\binance_test.go:2246:2: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/key' package 'key'
./exchanges\binanceus\binanceus.go:754:71: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/asset' package 'asset'
./exchanges\binanceus\binanceus.go:1589:72: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitfinex\bitfinex.go:403:3: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitfinex\bitfinex.go:501:2: importShadow: shadow of imported package 'url'
./exchanges\bitfinex\bitfinex.go:1366:72: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bithumb\bithumb.go:420:82: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bithumb\bithumb.go:437:78: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bithumb\bithumb.go:457:77: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitmex\bitmex.go:737:53: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitmex\bitmex.go:757:63: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitmex\bitmex.go:799:53: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitmex\bitmex.go:820:56: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitmex\bitmex.go:830:56: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitmex\bitmex_websocket.go:553:64: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/stream' package 'stream'
./exchanges\bitstamp\bitstamp.go:157:51: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitstamp\bitstamp.go:171:54: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitstamp\bitstamp.go:185:2: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/orderbook' package 'orderbook'
./exchanges\bitstamp\bitstamp.go:450:76: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitstamp\bitstamp.go:472:89: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitstamp\bitstamp.go:502:65: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/crypto' package 'crypto'
./exchanges\bitstamp\bitstamp.go:517:46: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bitstamp\bitstamp.go:539:80: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\btse\btse.go:214:54: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\btse\btse.go:226:57: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\btse\btse.go:253:54: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bybit\bybit.go:1287:56: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bybit\bybit.go:1328:57: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\bybit\bybit.go:2199:66: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\coinbasepro\coinbasepro.go:539:100: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\coinbasepro\coinbasepro.go:584:84: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\coinbasepro\coinbasepro.go:603:79: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\coinbasepro\coinbasepro.go:619:85: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\coinbasepro\coinbasepro.go:652:75: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\coinut\coinut.go:198:54: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/asset' package 'asset'
./exchanges\coinut\coinut.go:216:54: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/asset' package 'asset'
./exchanges\deribit\deribit.go:2392:81: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/nonce' package 'nonce'
./exchanges\deribit\deribit.go:2439:80: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/nonce' package 'nonce'
./exchanges\exmo\exmo.go:220:60: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\exmo\exmo.go:260:50: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\gateio\gateio_websocket_request_spot.go:26:64: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/order' package 'order'
./exchanges\gateio\gateio_test.go:3059:2: importShadow: shadow of imported package 'time'
./exchanges\gemini\gemini.go:336:80: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\gemini\gemini.go:355:63: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:74:51: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:229:59: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:241:58: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:253:66: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:297:49: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:310:53: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:334:50: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc.go:385:48: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\hitbtc\hitbtc_wrapper.go:569:57: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\huobi\huobi.go:643:75: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\huobi\huobi.go:671:72: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\huobi\huobi.go:711:80: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\kline\kline_datastorage.go:21:23: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/database/repository/exchange' package 'exchange'
./exchanges\kraken\kraken.go:433:55: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\kraken\kraken.go:448:48: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/asset' package 'asset'
./exchanges\kraken\kraken.go:463:57: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\kraken\kraken.go:1003:26: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\kraken\kraken_futures.go:296:67: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\kraken\kraken_websocket.go:324:5: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/trade' package 'trade'
./exchanges\kucoin\kucoin.go:2819:2: importShadow: shadow of imported package 'fmt'
./exchanges\kucoin\kucoin_futures.go:330:2: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/kline' package 'kline'
./exchanges\lbank\lbank.go:116:70: importShadow: shadow of imported package 'time'
./exchanges\mock\recording.go:452:3: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/file' package 'file'
./exchanges\okx\okx.go:1373:56: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\okx\okx_test.go:353:3: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/trade' package 'trade'
./exchanges\poloniex\poloniex.go:246:55: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:367:55: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:383:81: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:514:52: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:605:50: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:664:57: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:692:58: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:715:59: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:733:61: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\poloniex\poloniex.go:751:57: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./exchanges\stream\websocket.go:749:37: importShadow: shadow of imported package 'url'
./exchanges\stream\websocket_connection.go:281:38: importShadow: shadow of imported package 'url'
./exchanges\stream\websocket_connection.go:296:116: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/exchanges/request' package 'request'
./exchanges\stream\websocket_connection.go:376:27: importShadow: shadow of imported package 'url'
./exchanges\yobit\yobit.go:237:51: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/currency' package 'currency'
./log\logger_rotate.go:64:2: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/file' package 'file'
./log\logger_rotate.go:92:2: importShadow: shadow of imported from 'github.com/thrasher-corp/gocryptotrader/common/file' package 'file' |
FYI, the problem is not related to v2, it was already here in v1. I found the root cause (it only impacts |
Thank you @ldez ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Welcome
typecheck
section of the FAQ.How did you install golangci-lint?
Official binary
Description of the problem
When running golangci-lint with gocritic with
enable-all
enabled and a test function shadowing fmt, I'm getting no output to do with the issue. I then tried the gocritic tool manuallygocritic check -enable importShadow ./...
and it picked up those issues without any problems.Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
Validation
Supporter
The text was updated successfully, but these errors were encountered: