Preparing report...

Report for github.com/bazo-blockchain/bazo-vm

A+    Excellent!    Found 10 issues across 17 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!


golint64%

Golint is a linter for Go source code.

    • bazo-vm/vm/stack.go
    • Line 7: warning: exported type Stack should have comment or be unexported (golint)
    • Line 13: warning: exported function NewStack should have comment or be unexported (golint)
    • Line 21: warning: exported method Stack.GetLength should have comment or be unexported (golint)
    • Line 25: warning: exported method Stack.Push should have comment or be unexported (golint)
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 35: warning: exported method Stack.PopIndexAt should have comment or be unexported (golint)
    • Line 41: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 46: warning: exported method Stack.Pop should have comment or be unexported (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 57: warning: exported method Stack.PeekBytes should have comment or be unexported (golint)
    • Line 61: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • bazo-vm/vm/utils.go
    • Line 12: warning: exported const UINT16_MAX should have comment or be unexported (golint)
    • Line 14: warning: exported function UInt64ToByteArray should have comment or be unexported (golint)
    • Line 20: warning: exported function UInt16ToByteArray should have comment or be unexported (golint)
    • Line 26: warning: exported function UInt16ToBigInt should have comment or be unexported (golint)
    • Line 30: warning: exported function BigIntToUInt16 should have comment or be unexported (golint)
    • Line 40: warning: exported function BigIntToUInt should have comment or be unexported (golint)
    • Line 47: warning: exported function ByteArrayToUI16 should have comment or be unexported (golint)
    • Line 59: warning: exported function StrToBigInt should have comment or be unexported (golint)
    • Line 66: warning: exported function ByteArrayToInt should have comment or be unexported (golint)
    • Line 72: warning: exported function BigIntToString should have comment or be unexported (golint)
    • Line 77: warning: exported function BoolToByteArray should have comment or be unexported (golint)
    • Line 85: warning: exported function ByteArrayToBool should have comment or be unexported (golint)
    • Line 89: warning: exported function SignedBigIntConversion should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 109: warning: exported function UnsignedBigIntConversion should have comment or be unexported (golint)
    • Line 112: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 119: warning: exported function SignedByteArrayConversion should have comment or be unexported (golint)
    • Line 131: warning: exported function BigIntToByteArray should have comment or be unexported (golint)
    • Line 143: warning: exported function BigIntToPushableBytes should have comment or be unexported (golint)
    • bazo-vm/vm/array.go
    • Line 8: warning: exported type Array should have comment or be unexported (golint)
    • Line 10: warning: exported function NewArray should have comment or be unexported (golint)
    • Line 16: warning: exported function ArrayFromByteArray should have comment or be unexported (golint)
    • Line 27: warning: exported method Array.GetSize should have comment or be unexported (golint)
    • Line 45: warning: exported method Array.IncrementSize should have comment or be unexported (golint)
    • Line 55: warning: exported method Array.DecrementSize should have comment or be unexported (golint)
    • Line 69: warning: exported method Array.At should have comment or be unexported (golint)
    • Line 109: warning: exported method Array.Append should have comment or be unexported (golint)
    • bazo-vm/vm/call_stack.go
    • Line 7: warning: exported type Frame should have comment or be unexported (golint)
    • Line 14: warning: exported type CallStack should have comment or be unexported (golint)
    • Line 18: warning: exported function NewCallStack should have comment or be unexported (golint)
    • Line 22: warning: exported method CallStack.GetLength should have comment or be unexported (golint)
    • Line 26: warning: exported method CallStack.Push should have comment or be unexported (golint)
    • Line 30: warning: exported method CallStack.Pop should have comment or be unexported (golint)
    • Line 39: warning: exported method CallStack.Peek should have comment or be unexported (golint)
    • bazo-vm/vm/map.go
    • Line 9: warning: exported type Map should have comment or be unexported (golint)
    • Line 11: warning: exported function CreateMap should have comment or be unexported (golint)
    • Line 15: warning: exported function MapFromByteArray should have comment or be unexported (golint)
    • Line 38: warning: exported method Map.IncrementSize should have comment or be unexported (golint)
    • Line 47: warning: exported method Map.DecrementSize should have comment or be unexported (golint)
    • Line 61: warning: exported method Map.MapContainsKey should have comment or be unexported (golint)
    • Line 91: warning: exported method Map.Append should have comment or be unexported (golint)
    • Line 107: warning: exported method Map.SetVal should have comment or be unexported (golint)
    • Line 116: warning: exported method Map.GetVal should have comment or be unexported (golint)
    • Line 148: warning: exported method Map.Remove should have comment or be unexported (golint)
    • bazo-vm/vm/mock_context.go
    • Line 7: warning: exported type MockContext should have comment or be unexported (golint)
    • Line 11: warning: exported function NewMockContext should have comment or be unexported (golint)
    • Line 18: warning: exported method MockContext.SetContract should have comment or be unexported (golint)

gocyclo94%

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.


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell82%

Misspell Finds commonly misspelled English words

    • bazo-vm/vm/vm_test.go
    • Line 1043: warning: "lenght" is a misspelling of "length" (misspell)
    • Line 1069: warning: "lenght" is a misspelling of "length" (misspell)
    • Line 1095: warning: "lenght" is a misspelling of "length" (misspell)
    • Line 1163: warning: "lenght" is a misspelling of "length" (misspell)
    • Line 1234: warning: "lenght" is a misspelling of "length" (misspell)
    • Line 1272: warning: "lenght" is a misspelling of "length" (misspell)