Preparing report...

Report for github.com/nspcc-dev/neo-go

(v0.99.2)

A+    Excellent!    Found 49 issues across 643 files

Tweet

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!


gofmt100%

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

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

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.

    • pkg/vm/vm.go
    • Line 572: warning: cyclomatic complexity 274 of function (*VM).execute() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 17 of function (*VM).PrintOps() is high (> 15) (gocyclo)
    • Line 1790: warning: cyclomatic complexity 17 of function CheckMultisigPar() is high (> 15) (gocyclo)
    • pkg/services/notary/notary.go
    • Line 228: warning: cyclomatic complexity 32 of function (*Notary).OnNewRequest() is high (> 15) (gocyclo)
    • Line 425: warning: cyclomatic complexity 17 of function (*Notary).newTxCallbackLoop() is high (> 15) (gocyclo)
    • pkg/smartcontract/parameter.go
    • Line 262: warning: cyclomatic complexity 29 of function NewParameterFromValue() is high (> 15) (gocyclo)
    • Line 102: warning: cyclomatic complexity 26 of function (*Parameter).UnmarshalJSON() is high (> 15) (gocyclo)
    • Line 198: warning: cyclomatic complexity 19 of function NewParameterFromString() is high (> 15) (gocyclo)
    • pkg/compiler/compiler.go
    • Line 222: warning: cyclomatic complexity 27 of function CompileAndSave() is high (> 15) (gocyclo)
    • Line 324: warning: cyclomatic complexity 27 of function CreateManifest() is high (> 15) (gocyclo)
    • pkg/vm/stackitem/serialization.go
    • Line 129: warning: cyclomatic complexity 23 of function (*SerializationContext).serialize() is high (> 15) (gocyclo)
    • Line 251: warning: cyclomatic complexity 20 of function (*deserContext).decodeBinary() is high (> 15) (gocyclo)
    • pkg/config/protocol_config.go
    • Line 202: warning: cyclomatic complexity 46 of function (*ProtocolConfiguration).Equals() is high (> 15) (gocyclo)
    • Line 89: warning: cyclomatic complexity 25 of function (*ProtocolConfiguration).Validate() is high (> 15) (gocyclo)
    • cli/server/server.go
    • Line 468: warning: cyclomatic complexity 39 of function startServer() is high (> 15) (gocyclo)
    • Line 283: warning: cyclomatic complexity 23 of function restoreDB() is high (> 15) (gocyclo)
    • pkg/vm/contract_checks.go
    • Line 140: warning: cyclomatic complexity 18 of function IsScriptCorrect() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 18 of function ParseMultiSigContract() is high (> 15) (gocyclo)
    • pkg/compiler/analysis.go
    • Line 253: warning: cyclomatic complexity 27 of function (*codegen).analyzeFuncUsage() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 19 of function (*codegen).traverseGlobals() is high (> 15) (gocyclo)
    • cli/wallet/nep17.go
    • Line 153: warning: cyclomatic complexity 30 of function getNEP17Balance() is high (> 15) (gocyclo)
    • Line 568: warning: cyclomatic complexity 18 of function transferNEP() is high (> 15) (gocyclo)
    • Line 483: warning: cyclomatic complexity 16 of function multiTransferNEP17() is high (> 15) (gocyclo)
    • pkg/vm/stackitem/json.go
    • Line 283: warning: cyclomatic complexity 28 of function toJSONWithTypes() is high (> 15) (gocyclo)
    • Line 413: warning: cyclomatic complexity 27 of function FromJSONWithTypes() is high (> 15) (gocyclo)
    • Line 57: warning: cyclomatic complexity 22 of function toJSON() is high (> 15) (gocyclo)
    • Line 179: warning: cyclomatic complexity 16 of function (*decoder).decode() is high (> 15) (gocyclo)
    • pkg/network/server.go
    • Line 1177: warning: cyclomatic complexity 26 of function (*Server).handleMessage() is high (> 15) (gocyclo)
    • Line 377: warning: cyclomatic complexity 18 of function (*Server).run() is high (> 15) (gocyclo)
    • pkg/services/rpcsrv/server.go
    • Line 2543: warning: cyclomatic complexity 25 of function (*Server).handleSubEvents() is high (> 15) (gocyclo)
    • Line 1431: warning: cyclomatic complexity 22 of function (*Server).findStates() is high (> 15) (gocyclo)
    • Line 2392: warning: cyclomatic complexity 20 of function (*Server).subscribe() is high (> 15) (gocyclo)
    • Line 1160: warning: cyclomatic complexity 20 of function (*Server).getTokenTransfers() is high (> 15) (gocyclo)
    • Line 507: warning: cyclomatic complexity 17 of function (*Server).handleWsWrites() is high (> 15) (gocyclo)
    • Line 847: warning: cyclomatic complexity 17 of function (*Server).getNEP11Balances() is high (> 15) (gocyclo)
    • pkg/core/mpt/trie.go
    • Line 96: warning: cyclomatic complexity 17 of function (*Trie).getWithPath() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 17 of function (*Trie).Find() is high (> 15) (gocyclo)
    • cli/wallet/wallet.go
    • Line 353: warning: cyclomatic complexity 17 of function changePassword() is high (> 15) (gocyclo)
    • Line 464: warning: cyclomatic complexity 16 of function exportKeys() is high (> 15) (gocyclo)
    • pkg/compiler/codegen.go
    • Line 547: warning: cyclomatic complexity 163 of function (*codegen).Visit() is high (> 15) (gocyclo)
    • Line 1999: warning: cyclomatic complexity 27 of function convertToken() is high (> 15) (gocyclo)
    • Line 446: warning: cyclomatic complexity 24 of function (*codegen).convertFuncDecl() is high (> 15) (gocyclo)
    • Line 1740: warning: cyclomatic complexity 22 of function (*codegen).convertBuiltin() is high (> 15) (gocyclo)
    • Line 2226: warning: cyclomatic complexity 21 of function (*codegen).writeJumps() is high (> 15) (gocyclo)
    • Line 1639: warning: cyclomatic complexity 16 of function (*codegen).convertSyscall() is high (> 15) (gocyclo)
    • pkg/core/blockchain.go
    • Line 1049: warning: cyclomatic complexity 41 of function (*Blockchain).storeBlock() is high (> 15) (gocyclo)
    • Line 344: warning: cyclomatic complexity 35 of function (*Blockchain).init() is high (> 15) (gocyclo)
    • Line 782: warning: cyclomatic complexity 33 of function (*Blockchain).notificationDispatcher() is high (> 15) (gocyclo)
    • Line 2030: warning: cyclomatic complexity 29 of function (*Blockchain).verifyTxAttributes() is high (> 15) (gocyclo)
    • Line 1957: warning: cyclomatic complexity 21 of function (*Blockchain).verifyAndPoolTx() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 19 of function NewBlockchain() is high (> 15) (gocyclo)
    • Line 958: warning: cyclomatic complexity 16 of function (*Blockchain).addHeaders() is high (> 15) (gocyclo)
    • pkg/vm/json_test.go
    • Line 378: warning: cyclomatic complexity 23 of function (*vmUTStackItem).UnmarshalJSON() is high (> 15) (gocyclo)
    • pkg/vm/stackitem/item.go
    • Line 91: warning: cyclomatic complexity 16 of function Make() is high (> 15) (gocyclo)
    • Line 1179: warning: cyclomatic complexity 16 of function deepCopy() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!