Preparing report...

Report for github.com/threefoldfoundation/tfchain

A+    Excellent!    Found 21 issues across 56 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!


gocyclo85%

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.

    • tfchain/extensions/threebot/plugin.go
    • Line 900: warning: cyclomatic complexity 27 of function (*Plugin).validateBotRegistrationTx() is high (> 15) (gocyclo)
    • Line 668: warning: cyclomatic complexity 22 of function (*Plugin).revertRecordUpdateTx() is high (> 15) (gocyclo)
    • Line 461: warning: cyclomatic complexity 21 of function (*Plugin).applyBotNameTransferTx() is high (> 15) (gocyclo)
    • Line 781: warning: cyclomatic complexity 21 of function (*Plugin).revertBotNameTransferTx() is high (> 15) (gocyclo)
    • Line 361: warning: cyclomatic complexity 20 of function (*Plugin).applyRecordUpdateTx() is high (> 15) (gocyclo)
    • tfchain/pkg/api/explorer.go
    • Line 74: warning: cyclomatic complexity 46 of function NewExplorerHashHandler() is high (> 15) (gocyclo)
    • Line 345: warning: cyclomatic complexity 20 of function getUnconfirmedTransactions() is high (> 15) (gocyclo)

golint80%

Golint is a linter for Go source code.

    • tfchain/pkg/config/config.go
    • Line 176: warning: exported function GetStandardnetGenesisAuthCoinCondition should have comment or be unexported (golint)
    • Line 247: warning: exported function GetTestnetGenesisAuthCoinCondition should have comment or be unexported (golint)
    • Line 325: warning: exported function GetDevnetGenesisAuthCoinCondition should have comment or be unexported (golint)
    • tfchain/cmd/tfchaint/explorer/explorer.go
    • Line 68: warning: exported method Explorer.Get should have comment or be unexported (golint)
    • Line 73: warning: exported method Explorer.GetWithResponse should have comment or be unexported (golint)
    • Line 78: warning: exported method Explorer.Post should have comment or be unexported (golint)
    • Line 83: warning: exported method Explorer.PostWithResponse should have comment or be unexported (golint)
    • tfchain/cmd/tfchaint/explorer/groupedexplorers.go
    • Line 75: warning: exported method GroupedExplorer.Get should have comment or be unexported (golint)
    • Line 91: warning: exported method GroupedExplorer.GetWithResponse should have comment or be unexported (golint)
    • Line 107: warning: exported method GroupedExplorer.Post should have comment or be unexported (golint)
    • Line 123: warning: exported method GroupedExplorer.PostWithResponse should have comment or be unexported (golint)
    • tfchain/extensions/tfchain/client/transactions.go
    • Line 19: warning: exported function RegisterStandardTransactions should have comment or be unexported (golint)
    • Line 23: warning: exported function RegisterTestnetTransactions should have comment or be unexported (golint)
    • Line 27: warning: exported function RegisterDevnetTransactions should have comment or be unexported (golint)
    • tfchain/extensions/tfchain/consensus/validators.go
    • Line 11: warning: exported function GetStandardTransactionValidators should have comment or be unexported (golint)
    • Line 26: warning: exported function GetStandardTransactionVersionMappedValidators should have comment or be unexported (golint)
    • Line 48: warning: exported function GetTestnetTransactionValidators should have comment or be unexported (golint)
    • Line 63: warning: exported function GetTestnetTransactionVersionMappedValidators should have comment or be unexported (golint)
    • Line 85: warning: exported function GetDevnetTransactionValidators should have comment or be unexported (golint)
    • Line 102: warning: exported function GetDevnetTransactionVersionMappedValidators should have comment or be unexported (golint)
    • tfchain/extensions/threebot/client/plugin.go
    • Line 49: warning: exported method PluginClient.GetRecordForKey should have comment or be unexported (golint)
    • Line 58: warning: exported method PluginClient.GetRecordForName should have comment or be unexported (golint)
    • Line 67: warning: exported method PluginClient.GetRecordForID should have comment or be unexported (golint)
    • Line 76: warning: exported method PluginClient.BotRecordForString should have comment or be unexported (golint)
    • Line 99: warning: exported method PluginClient.GetBotTransactionIdentifiers should have comment or be unexported (golint)

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!


misspell82%

Misspell Finds commonly misspelled English words

    • tfchain/extensions/threebot/client/walletcmd.go
    • Line 93: warning: "transfered" is a misspelling of "transferred" (misspell)
    • Line 119: warning: "seperate" is a misspelling of "separate" (misspell)
    • Line 125: warning: "seperate" is a misspelling of "separate" (misspell)
    • Line 144: warning: "seperate" is a misspelling of "separate" (misspell)
    • Line 150: warning: "seperate" is a misspelling of "separate" (misspell)
    • Line 156: warning: "seperate" is a misspelling of "separate" (misspell)
    • Line 162: warning: "seperate" is a misspelling of "separate" (misspell)