Preparing report...

Report for github.com/TTCECO/carnot

A+    Excellent!    Found 14 issues across 25 files

Tweet

gofmt92%

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!


gocyclo92%

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.


golint52%

Golint is a linter for Go source code.

    • carnot/app/app.go
    • Line 61: warning: comment on exported type CarnotApp should be of the form "CarnotApp ..." (with optional leading article) (golint)
    • Line 247: warning: comment on exported function MakeCodec should be of the form "MakeCodec ..." (golint)
    • Line 263: warning: comment on exported method CarnotApp.BeginBlocker should be of the form "BeginBlocker ..." (golint)
    • Line 286: warning: comment on exported method CarnotApp.EndBlocker should be of the form "EndBlocker ..." (golint)
    • Line 395: warning: comment on exported method CarnotApp.LoadHeight should be of the form "LoadHeight ..." (golint)
    • Line 411: warning: exported function NewStakingHooks should have comment or be unexported (golint)
    • Line 415: warning: comment on exported method StakingHooks.AfterValidatorCreated should be of the form "AfterValidatorCreated ..." (golint)
    • Line 420: warning: exported method StakingHooks.BeforeValidatorModified should have comment or be unexported (golint)
    • Line 424: warning: exported method StakingHooks.AfterValidatorRemoved should have comment or be unexported (golint)
    • Line 428: warning: exported method StakingHooks.AfterValidatorBonded should have comment or be unexported (golint)
    • Line 432: warning: exported method StakingHooks.AfterValidatorBeginUnbonding should have comment or be unexported (golint)
    • Line 436: warning: exported method StakingHooks.BeforeDelegationCreated should have comment or be unexported (golint)
    • Line 440: warning: exported method StakingHooks.BeforeDelegationSharesModified should have comment or be unexported (golint)
    • Line 444: warning: exported method StakingHooks.BeforeDelegationRemoved should have comment or be unexported (golint)
    • Line 448: warning: exported method StakingHooks.AfterDelegationModified should have comment or be unexported (golint)
    • Line 452: warning: exported method StakingHooks.BeforeValidatorSlashed should have comment or be unexported (golint)
    • carnot/app/export.go
    • Line 38: warning: comment on exported method CarnotApp.ExportAppStateAndValidators should be of the form "ExportAppStateAndValidators ..." (golint)
    • carnot/app/genesis.go
    • Line 50: warning: comment on exported type GenesisState should be of the form "GenesisState ..." (with optional leading article) (golint)
    • Line 64: warning: exported function NewGenesisState should have comment or be unexported (golint)
    • Line 109: warning: exported function NewGenesisAccount should have comment or be unexported (golint)
    • Line 118: warning: exported function NewGenesisAccountI should have comment or be unexported (golint)
    • Line 138: warning: comment on exported method GenesisAccount.ToAccount should be of the form "ToAccount ..." (golint)
    • Line 173: warning: comment on exported function AppGenState should be of the form "AppGenState ..." (golint)
    • Line 311: warning: comment on exported function AppGenStateJSON should be of the form "AppGenStateJSON ..." (golint)
    • Line 422: warning: exported function NewDefaultGenesisAccount should have comment or be unexported (golint)
    • carnot/x/tcchan/operator.go
    • Line 38: warning: exported type Operator should have comment or be unexported (golint)
    • Line 53: warning: exported function NewCrossChainOperator should have comment or be unexported (golint)
    • Line 104: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 121: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 166: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 217: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 225: warning: comment on exported method Operator.GetContractWithdrawRecords should be of the form "GetContractWithdrawRecords ..." (golint)
    • carnot/x/tcchan/contract/carnotcd/params.go
    • Line 35: warning: comment on exported const Address should be of the form "Address ..." (golint)
    • Line 38: warning: exported const PrivateKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: comment on exported const TokenAddress should be of the form "TokenAddress ..." (golint)
    • carnot/x/tcchan/keeper.go
    • Line 111: warning: comment on exported method TCChanKeeper.GetOrder should be of the form "GetOrder ..." (golint)
    • Line 127: warning: comment on exported method TCChanKeeper.SetOrder should be of the form "SetOrder ..." (golint)
    • Line 138: warning: comment on exported method TCChanKeeper.GetConfirm should be of the form "GetConfirm ..." (golint)
    • Line 154: warning: comment on exported method TCChanKeeper.SetConfirm should be of the form "SetConfirm ..." (golint)
    • Line 199: warning: exported method TCChanKeeper.CalculateConfirm should have comment or be unexported (golint)
    • Line 208: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 218: warning: exported method TCChanKeeper.CatchWithdrawOrder should have comment or be unexported (golint)
    • Line 253: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 261: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 327: warning: comment on exported method TCChanKeeper.GetPerson should be of the form "GetPerson ..." (golint)
    • Line 347: warning: comment on exported method TCChanKeeper.SetPerson should be of the form "SetPerson ..." (golint)
    • Line 358: warning: comment on exported method TCChanKeeper.GetCurrent should be of the form "GetCurrent ..." (golint)
    • Line 374: warning: comment on exported method TCChanKeeper.SetCurrent should be of the form "SetCurrent ..." (golint)
    • Line 385: warning: comment on exported method TCChanKeeper.GetRecordsIterator should be of the form "GetRecordsIterator ..." (golint)
    • carnot/x/tcchan/params.go
    • Line 20: warning: exported const RouterName should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: comment on exported const RPCURL should be of the form "RPCURL ..." (golint)
    • carnot/x/tcchan/types.go
    • Line 26: warning: exported const OrderstatusProcess should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported type WithdrawConfirm should have comment or be unexported (golint)
    • carnot/app/util.go
    • Line 47: warning: comment on exported type Context should be of the form "Context ..." (with optional leading article) (golint)
    • Line 53: warning: exported function NewDefaultContext should have comment or be unexported (golint)
    • Line 60: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 146: warning: comment on exported function AddCommands should be of the form "AddCommands ..." (golint)
    • Line 197: warning: comment on exported function ExternalIP should be of the form "ExternalIP ..." (golint)
    • carnot/x/tcchan/contract/carnotcd/deploy.go
    • Line 56: warning: exported function DeployCmd should have comment or be unexported (golint)
    • Line 147: warning: exported function InitContractSettingCmd should have comment or be unexported (golint)
    • Line 198: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 205: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 216: warning: exported function WithdrawTxCmd should have comment or be unexported (golint)
    • Line 270: warning: exported function WithdrawTokenCmd should have comment or be unexported (golint)
    • Line 323: warning: exported function DisplayTxCmd should have comment or be unexported (golint)
    • Line 345: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 351: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 364: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words