Preparing report...

Report for github.com/idoall/gocryptotrader

A+    Excellent!    Found 146 issues across 535 files

Tweet

gofmt99%

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


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/stream/websocket.go
    • Line 286: warning: cyclomatic complexity 18 of function (*Websocket).connectionMonitor() is high (> 15) (gocyclo)
    • Line 467: 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/exchanges/exchange_test.go
    • Line 402: warning: cyclomatic complexity 25 of function TestLoadConfigPairs() is high (> 15) (gocyclo)
    • Line 678: warning: cyclomatic complexity 24 of function TestGetEnabledPairs() is high (> 15) (gocyclo)
    • Line 800: warning: cyclomatic complexity 23 of function TestGetAvailablePairs() is high (> 15) (gocyclo)
    • Line 1333: warning: cyclomatic complexity 21 of function TestUpdatePairs() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/order/order_test.go
    • Line 591: warning: cyclomatic complexity 38 of function TestUpdateOrderFromModify() is high (> 15) (gocyclo)
    • Line 783: warning: cyclomatic complexity 38 of function TestUpdateOrderFromDetail() is high (> 15) (gocyclo)
    • Line 986: warning: cyclomatic complexity 20 of function TestValidationOnOrderTypes() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/exchange.go
    • Line 844: warning: cyclomatic complexity 24 of function (*Base).FormatWithdrawPermissions() is high (> 15) (gocyclo)
    • Line 621: warning: cyclomatic complexity 16 of function (*Base).ValidateAPICredentials() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/order/orders.go
    • Line 65: warning: cyclomatic complexity 58 of function (*Detail).UpdateOrderFromDetail() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 58 of function (*Detail).UpdateOrderFromModify() is high (> 15) (gocyclo)
    • Line 643: warning: cyclomatic complexity 18 of function StringToOrderStatus() is high (> 15) (gocyclo)
    • Line 16: warning: cyclomatic complexity 16 of function (*Submit).Validate() is high (> 15) (gocyclo)
    • gocryptotrader/engine/rpcserver.go
    • Line 2519: warning: cyclomatic complexity 22 of function (*RPCServer).ConvertTradesToCandles() is high (> 15) (gocyclo)
    • Line 2601: warning: cyclomatic complexity 21 of function (*RPCServer).FindMissingSavedCandleIntervals() is high (> 15) (gocyclo)
    • Line 2695: warning: cyclomatic complexity 21 of function (*RPCServer).FindMissingSavedTradeIntervals() is high (> 15) (gocyclo)
    • Line 2016: warning: cyclomatic complexity 21 of function (*RPCServer).GCTScriptUpload() is high (> 15) (gocyclo)
    • Line 1394: warning: cyclomatic complexity 20 of function (*RPCServer).SetExchangePair() is high (> 15) (gocyclo)
    • Line 1738: warning: cyclomatic complexity 19 of function (*RPCServer).GetHistoricCandles() is high (> 15) (gocyclo)
    • Line 2457: warning: cyclomatic complexity 17 of function (*RPCServer).GetSavedTrades() is high (> 15) (gocyclo)
    • Line 2811: warning: cyclomatic complexity 17 of function (*RPCServer).GetHistoricTrades() 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/exchanges/kline/kline.go
    • Line 164: warning: cyclomatic complexity 22 of function durationToWord() is high (> 15) (gocyclo)
    • Line 212: warning: cyclomatic complexity 21 of function TotalCandlesPerInterval() is high (> 15) (gocyclo)
    • Line 16: warning: cyclomatic complexity 18 of function CreateKline() is high (> 15) (gocyclo)
    • gocryptotrader/exchanges/coinut/coinut_wrapper.go
    • Line 805: warning: cyclomatic complexity 22 of function (*COINUT).GetActiveOrders() is high (> 15) (gocyclo)
    • Line 685: warning: cyclomatic complexity 20 of function (*COINUT).CancelAllOrders() is high (> 15) (gocyclo)
    • Line 921: warning: cyclomatic complexity 20 of function (*COINUT).GetOrderHistory() 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/cmd/gctcli/commands.go
    • Line 4090: warning: cyclomatic complexity 29 of function getHistoricCandlesExtended() is high (> 15) (gocyclo)
    • Line 1345: warning: cyclomatic complexity 24 of function submitOrder() is high (> 15) (gocyclo)
    • Line 4265: warning: cyclomatic complexity 23 of function findMissingSavedCandleIntervals() is high (> 15) (gocyclo)
    • Line 2415: warning: cyclomatic complexity 22 of function withdrawCryptocurrencyFunds() is high (> 15) (gocyclo)
    • Line 2989: warning: cyclomatic complexity 20 of function getOrderbookStream() is high (> 15) (gocyclo)
    • Line 3936: warning: cyclomatic complexity 20 of function getHistoricCandles() is high (> 15) (gocyclo)
    • Line 2099: warning: cyclomatic complexity 19 of function addEvent() is high (> 15) (gocyclo)
    • Line 1872: warning: cyclomatic complexity 18 of function cancelBatchOrders() is high (> 15) (gocyclo)
    • Line 1726: warning: cyclomatic complexity 18 of function cancelOrder() is high (> 15) (gocyclo)
    • Line 2530: warning: cyclomatic complexity 17 of function withdrawFiatFunds() is high (> 15) (gocyclo)
    • Line 2778: warning: cyclomatic complexity 17 of function withdrawlRequestByDate() is high (> 15) (gocyclo)
    • Line 1500: warning: cyclomatic complexity 16 of function simulateOrder() is high (> 15) (gocyclo)
    • gocryptotrader/engine/engine.go
    • Line 336: warning: cyclomatic complexity 32 of function (*Engine).Start() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 26 of function validateSettings() is high (> 15) (gocyclo)
    • Line 490: warning: cyclomatic complexity 22 of function (*Engine).Stop() is high (> 15) (gocyclo)
    • gocryptotrader/config/config.go
    • Line 802: warning: cyclomatic complexity 58 of function (*Config).CheckExchangeConfigValues() is high (> 15) (gocyclo)
    • Line 1095: warning: cyclomatic complexity 32 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 1219: 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/exchanges/exmo/exmo.go
    • Line 392: warning: cyclomatic complexity 28 of function getInternationalBankWithdrawalFee() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 22 of function getInternationalBankDepositFee() is high (> 15) (gocyclo)
    • gocryptotrader/engine/syncer.go
    • Line 288: warning: cyclomatic complexity 49 of function (*ExchangeCurrencyPairSyncer).worker() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 25 of function (*ExchangeCurrencyPairSyncer).update() is high (> 15) (gocyclo)
    • Line 503: warning: cyclomatic complexity 25 of function (*ExchangeCurrencyPairSyncer).Start() is high (> 15) (gocyclo)

golint96%

Golint is a linter for Go source code.

    • gocryptotrader/exchanges/binance/binance_custom_type.go
    • Line 87: warning: exported type SpotTradeFeeResponse should have comment or be unexported (golint)
    • Line 93: warning: exported type ContractTradeFeeResponse should have comment or be unexported (golint)
    • Line 99: warning: comment on exported type SpotSubmit should be of the form "SpotSubmit ..." (with optional leading article) (golint)
    • Line 200: warning: exported type AccountUpdateEventBalance should have comment or be unexported (golint)
    • Line 206: warning: exported type AccountUpdateEventPosition should have comment or be unexported (golint)
    • Line 217: warning: exported type AccountUpdateStreamResponse should have comment or be unexported (golint)
    • Line 231: warning: exported type MarkPriceStreamResponse should have comment or be unexported (golint)
    • Line 320: warning: don't use underscores in Go names; const MarginType_ISOLATED should be MarginTypeISOLATED (golint)
    • Line 322: warning: don't use underscores in Go names; const MarginType_CROSSED should be MarginTypeCROSSED (golint)
    • Line 325: warning: exported type FundingRateRequest should have comment or be unexported (golint)
    • Line 332: warning: exported type FundingRateResponeItem should have comment or be unexported (golint)
    • Line 338: warning: exported type IncomeResponse should have comment or be unexported (golint)
    • Line 349: warning: exported type IncomeRequest should have comment or be unexported (golint)
    • Line 361: warning: don't use underscores in Go names; const WorkingType_MARK_PRICE should be WorkingTypeMARKPRICE (golint)
    • Line 361: warning: exported const WorkingType_MARK_PRICE should have comment (or a comment on this block) or be unexported (golint)
    • Line 362: warning: don't use underscores in Go names; const WorkingType_CONTRACT_PRICE should be WorkingTypeCONTRACTPRICE (golint)
    • Line 365: warning: comment on exported type IncomeType should be of the form "IncomeType ..." (with optional leading article) (golint)
    • Line 369: warning: don't use underscores in Go names; const IncomeType_TRANSFER should be IncomeTypeTRANSFER (golint)
    • Line 369: warning: exported const IncomeType_TRANSFER should have comment (or a comment on this block) or be unexported (golint)
    • Line 370: warning: don't use underscores in Go names; const IncomeType_WELCOME_BONUS should be IncomeTypeWELCOMEBONUS (golint)
    • Line 371: warning: don't use underscores in Go names; const IncomeType_REALIZED_PNL should be IncomeTypeREALIZEDPNL (golint)
    • Line 372: warning: don't use underscores in Go names; const IncomeType_FUNDING_FEE should be IncomeTypeFUNDINGFEE (golint)
    • Line 373: warning: don't use underscores in Go names; const IncomeType_COMMISSION should be IncomeTypeCOMMISSION (golint)
    • Line 374: warning: don't use underscores in Go names; const IncomeType_INSURANCE_CLEAR should be IncomeTypeINSURANCECLEAR (golint)
    • Line 375: warning: don't use underscores in Go names; const IncomeType_ALL should be IncomeTypeALL (golint)
    • Line 382: warning: comment on exported const TransferType_MAIN_C2C should be of the form "TransferType_MAIN_C2C ..." (golint)
    • Line 383: warning: don't use underscores in Go names; const TransferType_MAIN_C2C should be TransferTypeMAINC2C (golint)
    • Line 384: warning: comment on exported const TransferType_MAIN_UMFUTURE should be of the form "TransferType_MAIN_UMFUTURE ..." (golint)
    • Line 385: warning: don't use underscores in Go names; const TransferType_MAIN_UMFUTURE should be TransferTypeMAINUMFUTURE (golint)
    • Line 386: warning: comment on exported const TransferType_MAIN_CMFUTURE should be of the form "TransferType_MAIN_CMFUTURE ..." (golint)
    • Line 387: warning: don't use underscores in Go names; const TransferType_MAIN_CMFUTURE should be TransferTypeMAINCMFUTURE (golint)
    • Line 388: warning: comment on exported const TransferType_MAIN_MARGIN should be of the form "TransferType_MAIN_MARGIN ..." (golint)
    • Line 389: warning: don't use underscores in Go names; const TransferType_MAIN_MARGIN should be TransferTypeMAINMARGIN (golint)
    • Line 390: warning: comment on exported const TransferType_MAIN_MINING should be of the form "TransferType_MAIN_MINING ..." (golint)
    • Line 391: warning: don't use underscores in Go names; const TransferType_MAIN_MINING should be TransferTypeMAINMINING (golint)
    • Line 392: warning: comment on exported const TransferType_C2C_MAIN should be of the form "TransferType_C2C_MAIN ..." (golint)
    • Line 393: warning: don't use underscores in Go names; const TransferType_C2C_MAIN should be TransferTypeC2CMAIN (golint)
    • Line 394: warning: comment on exported const TransferType_C2C_UMFUTURE should be of the form "TransferType_C2C_UMFUTURE ..." (golint)
    • Line 395: warning: don't use underscores in Go names; const TransferType_C2C_UMFUTURE should be TransferTypeC2CUMFUTURE (golint)
    • Line 396: warning: comment on exported const TransferType_C2C_MINING should be of the form "TransferType_C2C_MINING ..." (golint)
    • Line 397: warning: don't use underscores in Go names; const TransferType_C2C_MINING should be TransferTypeC2CMINING (golint)
    • Line 398: warning: comment on exported const TransferType_UMFUTURE_MAIN should be of the form "TransferType_UMFUTURE_MAIN ..." (golint)
    • Line 399: warning: don't use underscores in Go names; const TransferType_UMFUTURE_MAIN should be TransferTypeUMFUTUREMAIN (golint)
    • Line 400: warning: comment on exported const TransferType_UMFUTURE_C2C should be of the form "TransferType_UMFUTURE_C2C ..." (golint)
    • Line 401: warning: don't use underscores in Go names; const TransferType_UMFUTURE_C2C should be TransferTypeUMFUTUREC2C (golint)
    • Line 402: warning: comment on exported const TransferType_UMFUTURE_MARGIN should be of the form "TransferType_UMFUTURE_MARGIN ..." (golint)
    • Line 403: warning: don't use underscores in Go names; const TransferType_UMFUTURE_MARGIN should be TransferTypeUMFUTUREMARGIN (golint)
    • Line 404: warning: comment on exported const TransferType_CMFUTURE_MAIN should be of the form "TransferType_CMFUTURE_MAIN ..." (golint)
    • Line 405: warning: don't use underscores in Go names; const TransferType_CMFUTURE_MAIN should be TransferTypeCMFUTUREMAIN (golint)
    • Line 406: warning: comment on exported const TransferType_MARGIN_MAIN should be of the form "TransferType_MARGIN_MAIN ..." (golint)
    • Line 407: warning: don't use underscores in Go names; const TransferType_MARGIN_MAIN should be TransferTypeMARGINMAIN (golint)
    • Line 408: warning: comment on exported const TransferType_MARGIN_UMFUTURE should be of the form "TransferType_MARGIN_UMFUTURE ..." (golint)
    • Line 409: warning: don't use underscores in Go names; const TransferType_MARGIN_UMFUTURE should be TransferTypeMARGINUMFUTURE (golint)
    • Line 410: warning: comment on exported const TransferType_MINING_MAIN should be of the form "TransferType_MINING_MAIN ..." (golint)
    • Line 411: warning: don't use underscores in Go names; const TransferType_MINING_MAIN should be TransferTypeMININGMAIN (golint)
    • Line 413: warning: don't use underscores in Go names; const TransferType_MINING_UMFUTURE should be TransferTypeMININGUMFUTURE (golint)
    • Line 414: warning: comment on exported const TransferType_MINING_C2C should be of the form "TransferType_MINING_C2C ..." (golint)
    • Line 415: warning: don't use underscores in Go names; const TransferType_MINING_C2C should be TransferTypeMININGC2C (golint)
    • Line 418: warning: exported type FutureLeverageResponse should have comment or be unexported (golint)
    • Line 471: warning: don't use underscores in Go names; const ContractTypeCURRENT_MONTH should be ContractTypeCURRENTMONTH (golint)
    • Line 472: warning: comment on exported const ContractTypeNEXT_MONTH should be of the form "ContractTypeNEXT_MONTH ..." (golint)
    • Line 473: warning: don't use underscores in Go names; const ContractTypeNEXT_MONTH should be ContractTypeNEXTMONTH (golint)
    • gocryptotrader/exchanges/okgroup/okgroup_custom.go
    • Line 43: warning: exported type WebsocketResponseOrders should have comment or be unexported (golint)
    • Line 51: warning: exported type WebsocketResponseUserSwapFutureAccounts should have comment or be unexported (golint)
    • Line 59: warning: exported type WebsocketResponseUserSwapFutureAccountsData should have comment or be unexported (golint)
    • Line 79: warning: comment on exported type WebsocketResponseOrdersData should be of the form "WebsocketResponseOrdersData ..." (with optional leading article) (golint)
    • gocryptotrader/exchanges/huobi/huobi_custom_type.go
    • Line 37: warning: exported type HistoricalFundingRateResponseData should have comment or be unexported (golint)
    • Line 44: warning: exported type HistoricalFundingRateResponseDataItem should have comment or be unexported (golint)
    • Line 272: warning: comment on exported var ContractOpenOrderType2 should be of the form "ContractOpenOrderType2 ..." (golint)
    • Line 543: warning: comment on exported type ContractInfoResponseDataItem should be of the form "ContractInfoResponseDataItem ..." (with optional leading article) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (exit status 3)


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!