Preparing report...

Report for github.com/thrasher-/gocryptotrader

A+    Excellent!    Found 142 issues across 602 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo77%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • gocryptotrader/exchanges/orderbook/linked_list_test.go
    • Line 538: warning: cyclomatic complexity 20 of function TestUpdateInsertByIDAsk() is high (> 15) (gocyclo)
    • Line 810: warning: cyclomatic complexity 20 of function TestUpdateInsertByIDBids() is high (> 15) (gocyclo)
    • Line 1222: warning: cyclomatic complexity 20 of function Check() is high (> 15) (gocyclo)
    • Line 106: warning: cyclomatic complexity 17 of function TestUpdateInsertByPrice() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/coinut/coinut_wrapper.go
    • Line 822: warning: cyclomatic complexity 22 of function (*COINUT).GetActiveOrders() is high (> 15) (gocyclo)
    • Line 702: warning: cyclomatic complexity 20 of function (*COINUT).CancelAllOrders() is high (> 15) (gocyclo)
    • Line 938: warning: cyclomatic complexity 20 of function (*COINUT).GetOrderHistory() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/kline/kline.go
    • Line 235: warning: cyclomatic complexity 22 of function durationToWord() is high (> 15) (gocyclo)
    • Line 283: warning: cyclomatic complexity 21 of function TotalCandlesPerInterval() is high (> 15) (gocyclo)
    • Line 18: warning: cyclomatic complexity 18 of function CreateKline() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/exmo/exmo.go
    • Line 401: warning: cyclomatic complexity 28 of function getInternationalBankWithdrawalFee() is high (> 15) (gocyclo)
    • Line 471: warning: cyclomatic complexity 22 of function getInternationalBankDepositFee() is high (> 15) (gocyclo)
    • gocryptotrader/engine/rpcserver.go
    • Line 2177: warning: cyclomatic complexity 21 of function (*RPCServer).GCTScriptUpload() is high (> 15) (gocyclo)
    • Line 815: warning: cyclomatic complexity 20 of function (*RPCServer).GetOrders() is high (> 15) (gocyclo)
    • Line 1898: warning: cyclomatic complexity 19 of function (*RPCServer).GetHistoricCandles() is high (> 15) (gocyclo)
    • Line 2676: warning: cyclomatic complexity 19 of function (*RPCServer).ConvertTradesToCandles() is high (> 15) (gocyclo)
    • Line 2838: warning: cyclomatic complexity 18 of function (*RPCServer).FindMissingSavedTradeIntervals() is high (> 15) (gocyclo)
    • Line 2753: warning: cyclomatic complexity 18 of function (*RPCServer).FindMissingSavedCandleIntervals() is high (> 15) (gocyclo)
    • Line 1575: warning: cyclomatic complexity 18 of function (*RPCServer).SetExchangePair() is high (> 15) (gocyclo)
    • gocryptotrader/engine/exchange.go
    • Line 155: warning: cyclomatic complexity 58 of function (*Engine).LoadExchange() is high (> 15) (gocyclo)
    • Line 345: warning: cyclomatic complexity 16 of function (*Engine).SetupExchanges() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/order/order_test.go
    • Line 601: warning: cyclomatic complexity 38 of function TestUpdateOrderFromModify() is high (> 15) (gocyclo)
    • Line 793: warning: cyclomatic complexity 38 of function TestUpdateOrderFromDetail() is high (> 15) (gocyclo)
    • Line 996: warning: cyclomatic complexity 20 of function TestValidationOnOrderTypes() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/poloniex/poloniex_websocket.go
    • Line 118: warning: cyclomatic complexity 42 of function (*Poloniex).wsHandleData() is high (> 15) (gocyclo)
    • Line 378: warning: cyclomatic complexity 18 of function (*Poloniex).WsProcessOrderbookSnapshot() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 16 of function (*Poloniex).wsHandleTickerData() is high (> 15) (gocyclo)
    • Line 818: warning: cyclomatic complexity 16 of function (*Poloniex).processAccountOrderLimit() is high (> 15) (gocyclo)
    • gocryptotrader/engine/engine.go
    • Line 343: warning: cyclomatic complexity 38 of function (*Engine).Start() is high (> 15) (gocyclo)
    • Line 508: warning: cyclomatic complexity 28 of function (*Engine).Stop() is high (> 15) (gocyclo)
    • Line 139: warning: cyclomatic complexity 26 of function validateSettings() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/order/orders.go
    • Line 209: warning: cyclomatic complexity 58 of function (*Detail).UpdateOrderFromModify() is high (> 15) (gocyclo)
    • Line 60: warning: cyclomatic complexity 58 of function (*Detail).UpdateOrderFromDetail() is high (> 15) (gocyclo)
    • Line 643: warning: cyclomatic complexity 18 of function StringToOrderStatus() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/kraken/kraken_websocket.go
    • Line 193: warning: cyclomatic complexity 40 of function (*Kraken).wsHandleData() is high (> 15) (gocyclo)
    • Line 859: warning: cyclomatic complexity 26 of function (*Kraken).wsProcessOrderBookUpdate() is high (> 15) (gocyclo)
    • Line 380: warning: cyclomatic complexity 18 of function (*Kraken).wsReadDataResponse() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/kraken/kraken_wrapper.go
    • Line 1143: warning: cyclomatic complexity 34 of function (*Kraken).GetOrderHistory() is high (> 15) (gocyclo)
    • Line 847: warning: cyclomatic complexity 21 of function (*Kraken).GetOrderInfo() is high (> 15) (gocyclo)
    • Line 1036: warning: cyclomatic complexity 21 of function (*Kraken).GetActiveOrders() is high (> 15) (gocyclo)
    • Line 407: warning: cyclomatic complexity 18 of function (*Kraken).UpdateTicker() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/exchange.go
    • Line 863: warning: cyclomatic complexity 24 of function (*Base).FormatWithdrawPermissions() is high (> 15) (gocyclo)
    • Line 791: warning: cyclomatic complexity 19 of function (*Base).SetAPIURL() is high (> 15) (gocyclo)
    • Line 634: warning: cyclomatic complexity 16 of function (*Base).ValidateAPICredentials() is high (> 15) (gocyclo)
    • gocryptotrader/cmd/gctcli/commands.go
    • Line 4253: warning: cyclomatic complexity 29 of function getHistoricCandlesExtended() is high (> 15) (gocyclo)
    • Line 1499: warning: cyclomatic complexity 24 of function submitOrder() is high (> 15) (gocyclo)
    • Line 4428: warning: cyclomatic complexity 23 of function findMissingSavedCandleIntervals() is high (> 15) (gocyclo)
    • Line 2569: warning: cyclomatic complexity 22 of function withdrawCryptocurrencyFunds() is high (> 15) (gocyclo)
    • Line 3152: warning: cyclomatic complexity 20 of function getOrderbookStream() is high (> 15) (gocyclo)
    • Line 4099: warning: cyclomatic complexity 20 of function getHistoricCandles() is high (> 15) (gocyclo)
    • Line 2253: warning: cyclomatic complexity 19 of function addEvent() is high (> 15) (gocyclo)
    • Line 1262: warning: cyclomatic complexity 19 of function getOrders() is high (> 15) (gocyclo)
    • Line 1880: warning: cyclomatic complexity 18 of function cancelOrder() is high (> 15) (gocyclo)
    • Line 2026: warning: cyclomatic complexity 18 of function cancelBatchOrders() is high (> 15) (gocyclo)
    • Line 2684: warning: cyclomatic complexity 17 of function withdrawFiatFunds() is high (> 15) (gocyclo)
    • Line 2941: warning: cyclomatic complexity 17 of function withdrawlRequestByDate() is high (> 15) (gocyclo)
    • Line 1654: warning: cyclomatic complexity 16 of function simulateOrder() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/stream/websocket.go
    • Line 289: warning: cyclomatic complexity 18 of function (*Websocket).connectionMonitor() is high (> 15) (gocyclo)
    • Line 470: warning: cyclomatic complexity 17 of function (*Websocket).trafficMonitor() is high (> 15) (gocyclo)
    • Line 43: warning: cyclomatic complexity 16 of function (*Websocket).Setup() is high (> 15) (gocyclo)
    • gocryptotrader/backtester/backtest/backtest.go
    • Line 408: warning: cyclomatic complexity 41 of function (*BackTest).loadData() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 19 of function (*BackTest).setupExchangeSettings() is high (> 15) (gocyclo)
    • Line 64: warning: cyclomatic complexity 18 of function NewFromConfig() is high (> 15) (gocyclo)
    • gocryptotrader/config/config.go
    • Line 802: warning: cyclomatic complexity 51 of function (*Config).CheckExchangeConfigValues() is high (> 15) (gocyclo)
    • Line 1068: warning: cyclomatic complexity 33 of function (*Config).CheckCurrencyConfigValues() is high (> 15) (gocyclo)
    • Line 206: warning: cyclomatic complexity 29 of function (*Config).CheckCommunicationsConfig() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 21 of function (*Config).CheckPairConsistency() is high (> 15) (gocyclo)
    • Line 1194: warning: cyclomatic complexity 17 of function (*Config).RetrieveConfigCurrencyPairs() is high (> 15) (gocyclo)
    • Line 409: warning: cyclomatic complexity 16 of function (*Config).CheckPairConfigFormats() is high (> 15) (gocyclo)
    • gocryptotrader/engine/syncer.go
    • Line 272: warning: cyclomatic complexity 57 of function (*ExchangeCurrencyPairSyncer).worker() is high (> 15) (gocyclo)
    • Line 489: warning: cyclomatic complexity 29 of function (*ExchangeCurrencyPairSyncer).Start() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 25 of function (*ExchangeCurrencyPairSyncer).update() is high (> 15) (gocyclo)
    • gocryptotrader/cmd/gctcli/trades.go
    • Line 641: warning: cyclomatic complexity 27 of function convertSavedTradesToCandles() is high (> 15) (gocyclo)
    • Line 519: warning: cyclomatic complexity 23 of function getHistoricTrades() is high (> 15) (gocyclo)
    • Line 349: warning: cyclomatic complexity 20 of function getSavedTrades() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 19 of function findMissingSavedTradeIntervals() is high (> 15) (gocyclo)
    • gocryptotrader/cmd/apichecker/apicheck.go
    • Line 1589: warning: cyclomatic complexity 31 of function htmlScrapeFTX() is high (> 15) (gocyclo)
    • Line 451: warning: cyclomatic complexity 29 of function checkChangeLog() is high (> 15) (gocyclo)
    • Line 333: warning: cyclomatic complexity 28 of function checkUpdates() is high (> 15) (gocyclo)
    • Line 1091: warning: cyclomatic complexity 20 of function htmlScrapeYobit() is high (> 15) (gocyclo)
    • Line 80: warning: cyclomatic complexity 20 of function main() is high (> 15) (gocyclo)
    • Line 1036: warning: cyclomatic complexity 18 of function htmlScrapeAlphaPoint() is high (> 15) (gocyclo)
    • Line 1711: warning: cyclomatic complexity 17 of function htmlScrapeBinance() is high (> 15) (gocyclo)
    • Line 791: warning: cyclomatic complexity 17 of function htmlScrapeOk() is high (> 15) (gocyclo)
    • Line 610: warning: cyclomatic complexity 17 of function htmlScrapeDefault() is high (> 15) (gocyclo)
    • Line 1480: warning: cyclomatic complexity 16 of function htmlScrapeKraken() is high (> 15) (gocyclo)
    • Line 906: warning: cyclomatic complexity 16 of function htmlScrapePoloniex() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/binance/binance_ufutures.go
    • Line 199: warning: cyclomatic complexity 34 of function (*Binance).UKlineData() is high (> 15) (gocyclo)
    • Line 72: warning: cyclomatic complexity 17 of function (*Binance).UFuturesOrderbook() is high (> 15) (gocyclo)
    • Line 625: warning: cyclomatic complexity 16 of function (*Binance).UFuturesNewOrder() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/binance/binance_wrapper.go
    • Line 1263: warning: cyclomatic complexity 42 of function (*Binance).GetOrderHistory() is high (> 15) (gocyclo)
    • Line 756: warning: cyclomatic complexity 38 of function (*Binance).SubmitOrder() is high (> 15) (gocyclo)
    • Line 343: warning: cyclomatic complexity 19 of function (*Binance).FetchTradablePairs() is high (> 15) (gocyclo)
    • Line 940: warning: cyclomatic complexity 19 of function (*Binance).CancelAllOrders() is high (> 15) (gocyclo)
    • Line 1545: warning: cyclomatic complexity 17 of function compatibleOrderVars() is high (> 15) (gocyclo)
    • Line 1151: warning: cyclomatic complexity 17 of function (*Binance).GetActiveOrders() is high (> 15) (gocyclo)
    • Line 419: warning: cyclomatic complexity 17 of function (*Binance).UpdateTicker() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/binance/binance_cfutures.go
    • Line 225: warning: cyclomatic complexity 28 of function (*Binance).GetFuturesKlineData() is high (> 15) (gocyclo)
    • Line 344: warning: cyclomatic complexity 27 of function (*Binance).GetContinuousKlineData() is high (> 15) (gocyclo)
    • Line 575: warning: cyclomatic complexity 27 of function (*Binance).GetMarkPriceKline() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 26 of function (*Binance).GetIndexPriceKlines() is high (> 15) (gocyclo)
    • Line 76: warning: cyclomatic complexity 17 of function (*Binance).GetFuturesOrderbook() is high (> 15) (gocyclo)
    • Line 975: warning: cyclomatic complexity 16 of function (*Binance).FuturesNewOrder() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/huobi/huobi_wrapper.go
    • Line 1212: warning: cyclomatic complexity 31 of function (*HUOBI).GetActiveOrders() is high (> 15) (gocyclo)
    • Line 928: warning: cyclomatic complexity 28 of function (*HUOBI).CancelAllOrders() is high (> 15) (gocyclo)
    • Line 804: warning: cyclomatic complexity 27 of function (*HUOBI).SubmitOrder() is high (> 15) (gocyclo)
    • Line 619: warning: cyclomatic complexity 27 of function (*HUOBI).UpdateAccountInfo() is high (> 15) (gocyclo)
    • Line 1024: warning: cyclomatic complexity 26 of function (*HUOBI).GetOrderInfo() is high (> 15) (gocyclo)
    • Line 1393: warning: cyclomatic complexity 25 of function (*HUOBI).GetOrderHistory() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/exchange_test.go
    • Line 531: warning: cyclomatic complexity 25 of function TestLoadConfigPairs() is high (> 15) (gocyclo)
    • Line 807: warning: cyclomatic complexity 24 of function TestGetEnabledPairs() is high (> 15) (gocyclo)
    • Line 929: warning: cyclomatic complexity 23 of function TestGetAvailablePairs() is high (> 15) (gocyclo)
    • Line 1469: warning: cyclomatic complexity 21 of function TestUpdatePairs() is high (> 15) (gocyclo)

golint99%

Golint is a linter for Go source code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words