Preparing report...

Report for github.com/paradigm-network/paradigm-vm

A    Great!    Found 19 issues across 55 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!


gocyclo87%

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.

    • paradigm-vm/pvm/engine/exec/vm.go
    • Line 324: warning: cyclomatic complexity 22 of function (*VM).execCode() is high (> 15) (gocyclo)
    • Line 82: warning: cyclomatic complexity 16 of function NewVM() is high (> 15) (gocyclo)
    • Line 267: warning: cyclomatic complexity 16 of function (*VM).ExecCode() is high (> 15) (gocyclo)

golint72%

Golint is a linter for Go source code.

    • paradigm-vm/pvm/engine/wasm/init_expr.go
    • Line 26: warning: exported var ErrEmptyInitExpr should have comment or be unexported (golint)
    • Line 28: warning: exported type InvalidInitExprOpError should have comment or be unexported (golint)
    • Line 34: warning: exported type InvalidGlobalIndexError should have comment or be unexported (golint)
    • paradigm-vm/pvm/engine/wasm/types.go
    • Line 15: warning: exported type Marshaler should have comment or be unexported (golint)
    • Line 20: warning: exported type Unmarshaler should have comment or be unexported (golint)
    • Line 31: warning: exported const ValueTypeI32 should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: exported method ValueType.UnmarshalWASM should have comment or be unexported (golint)
    • Line 64: warning: exported method ValueType.MarshalWASM should have comment or be unexported (golint)
    • Line 71: warning: exported const BlockTypeEmpty should have comment or be unexported (golint)
    • Line 85: warning: exported method ElemType.UnmarshalWASM should have comment or be unexported (golint)
    • Line 94: warning: exported method ElemType.MarshalWASM should have comment or be unexported (golint)
    • Line 120: warning: exported type InvalidTypeConstructorError should have comment or be unexported (golint)
    • Line 129: warning: exported method FunctionSig.UnmarshalWASM should have comment or be unexported (golint)
    • Line 165: warning: exported method FunctionSig.MarshalWASM should have comment or be unexported (golint)
    • Line 201: warning: exported method GlobalVar.UnmarshalWASM should have comment or be unexported (golint)
    • Line 219: warning: exported method GlobalVar.MarshalWASM should have comment or be unexported (golint)
    • Line 240: warning: exported method Table.UnmarshalWASM should have comment or be unexported (golint)
    • Line 253: warning: exported method Table.MarshalWASM should have comment or be unexported (golint)
    • Line 263: warning: exported type Memory should have comment or be unexported (golint)
    • Line 267: warning: exported method Memory.UnmarshalWASM should have comment or be unexported (golint)
    • Line 271: warning: exported method Memory.MarshalWASM should have comment or be unexported (golint)
    • Line 279: warning: exported const ExternalFunction should have comment (or a comment on this block) or be unexported (golint)
    • Line 299: warning: exported method External.UnmarshalWASM should have comment or be unexported (golint)
    • Line 307: warning: exported method External.MarshalWASM should have comment or be unexported (golint)
    • Line 319: warning: exported method ResizableLimits.UnmarshalWASM should have comment or be unexported (golint)
    • Line 342: warning: exported method ResizableLimits.MarshalWASM should have comment or be unexported (golint)
    • paradigm-vm/pvm/engine/internal/stack/stack.go
    • Line 8: warning: exported type Stack should have comment or be unexported (golint)
    • Line 12: warning: exported method Stack.Push should have comment or be unexported (golint)
    • Line 16: warning: exported method Stack.Pop should have comment or be unexported (golint)
    • Line 22: warning: exported method Stack.SetTop should have comment or be unexported (golint)
    • Line 26: warning: exported method Stack.Top should have comment or be unexported (golint)
    • Line 30: warning: exported method Stack.Get should have comment or be unexported (golint)
    • Line 34: warning: exported method Stack.Set should have comment or be unexported (golint)
    • Line 38: warning: exported method Stack.Len should have comment or be unexported (golint)
    • paradigm-vm/pvm/engine/wasm/index.go
    • Line 12: warning: exported type InvalidTableIndexError should have comment or be unexported (golint)
    • Line 18: warning: exported type InvalidValueTypeInitExprError should have comment or be unexported (golint)
    • Line 27: warning: exported type InvalidLinearMemoryIndexError should have comment or be unexported (golint)
    • Line 173: warning: exported method Module.GetLinearMemoryData should have comment or be unexported (golint)
    • paradigm-vm/pvm/engine/validate/error.go
    • Line 15: warning: exported type Error should have comment or be unexported (golint)
    • Line 25: warning: exported var ErrStackUnderflow should have comment or be unexported (golint)
    • Line 27: warning: exported type InvalidImmediateError should have comment or be unexported (golint)
    • Line 36: warning: exported type UnmatchedOpError should have comment or be unexported (golint)
    • Line 43: warning: exported type InvalidLabelError should have comment or be unexported (golint)
    • Line 49: warning: exported type InvalidLocalIndexError should have comment or be unexported (golint)
    • Line 55: warning: exported type InvalidTypeError should have comment or be unexported (golint)
    • Line 64: warning: exported type InvalidElementIndexError should have comment or be unexported (golint)
    • Line 70: warning: exported type NoSectionError should have comment or be unexported (golint)
    • paradigm-vm/pvm/engine/wasm/section.go
    • Line 36: warning: exported const SectionIDCustom should have comment (or a comment on this block) or be unexported (golint)
    • Line 80: warning: exported method RawSection.SectionID should have comment or be unexported (golint)
    • Line 84: warning: exported method RawSection.GetRawSection should have comment or be unexported (golint)
    • Line 88: warning: exported type InvalidSectionIDError should have comment or be unexported (golint)
    • Line 94: warning: exported type InvalidCodeIndexError should have comment or be unexported (golint)
    • Line 100: warning: exported var ErrUnsupportedSection should have comment or be unexported (golint)
    • Line 102: warning: exported type MissingSectionError should have comment or be unexported (golint)
    • Line 222: warning: exported type SectionCustom should have comment or be unexported (golint)
    • Line 228: warning: exported method SectionCustom.SectionID should have comment or be unexported (golint)
    • Line 232: warning: exported method SectionCustom.ReadPayload should have comment or be unexported (golint)
    • Line 246: warning: exported method SectionCustom.WritePayload should have comment or be unexported (golint)
    • Line 262: warning: exported method SectionTypes.SectionID should have comment or be unexported (golint)
    • Line 266: warning: exported method SectionTypes.ReadPayload should have comment or be unexported (golint)
    • Line 280: warning: exported method SectionTypes.WritePayload should have comment or be unexported (golint)
    • Line 301: warning: exported method SectionImports.SectionID should have comment or be unexported (golint)
    • Line 305: warning: exported method SectionImports.ReadPayload should have comment or be unexported (golint)
    • Line 320: warning: exported method SectionImports.WritePayload should have comment or be unexported (golint)
    • Line 334: warning: exported method ImportEntry.UnmarshalWASM should have comment or be unexported (golint)
    • Line 400: warning: comment on exported type SectionFunctions should be of the form "SectionFunctions ..." (with optional leading article) (golint)
    • Line 407: warning: exported method SectionFunctions.SectionID should have comment or be unexported (golint)
    • Line 411: warning: exported method SectionFunctions.ReadPayload should have comment or be unexported (golint)
    • Line 427: warning: exported method SectionFunctions.WritePayload should have comment or be unexported (golint)
    • Line 445: warning: exported method SectionTables.SectionID should have comment or be unexported (golint)
    • Line 449: warning: exported method SectionTables.ReadPayload should have comment or be unexported (golint)
    • Line 464: warning: exported method SectionTables.WritePayload should have comment or be unexported (golint)
    • Line 482: warning: exported method SectionMemories.SectionID should have comment or be unexported (golint)
    • Line 486: warning: exported method SectionMemories.ReadPayload should have comment or be unexported (golint)
    • Line 501: warning: exported method SectionMemories.WritePayload should have comment or be unexported (golint)
    • Line 519: warning: exported method SectionGlobals.SectionID should have comment or be unexported (golint)
    • Line 523: warning: exported method SectionGlobals.ReadPayload should have comment or be unexported (golint)
    • Line 539: warning: exported method SectionGlobals.WritePayload should have comment or be unexported (golint)
    • Line 557: warning: exported method GlobalEntry.UnmarshalWASM should have comment or be unexported (golint)
    • Line 568: warning: exported method GlobalEntry.MarshalWASM should have comment or be unexported (golint)
    • Line 582: warning: exported method SectionExports.SectionID should have comment or be unexported (golint)
    • Line 586: warning: exported method SectionExports.ReadPayload should have comment or be unexported (golint)
    • Line 607: warning: exported method SectionExports.WritePayload should have comment or be unexported (golint)
    • Line 626: warning: exported type DuplicateExportError should have comment or be unexported (golint)
    • Line 639: warning: exported method ExportEntry.UnmarshalWASM should have comment or be unexported (golint)
    • Line 655: warning: exported method ExportEntry.MarshalWASM should have comment or be unexported (golint)
    • Line 674: warning: exported method SectionStartFunction.SectionID should have comment or be unexported (golint)
    • Line 678: warning: exported method SectionStartFunction.ReadPayload should have comment or be unexported (golint)
    • Line 684: warning: exported method SectionStartFunction.WritePayload should have comment or be unexported (golint)
    • Line 695: warning: exported method SectionElements.SectionID should have comment or be unexported (golint)
    • Line 699: warning: exported method SectionElements.ReadPayload should have comment or be unexported (golint)
    • Line 714: warning: exported method SectionElements.WritePayload should have comment or be unexported (golint)
    • Line 733: warning: exported method ElementSegment.UnmarshalWASM should have comment or be unexported (golint)
    • Line 760: warning: exported method ElementSegment.MarshalWASM should have comment or be unexported (golint)
    • Line 785: warning: exported method SectionCode.SectionID should have comment or be unexported (golint)
    • Line 789: warning: exported method SectionCode.ReadPayload should have comment or be unexported (golint)
    • Line 806: warning: exported method SectionCode.WritePayload should have comment or be unexported (golint)
    • Line 818: warning: exported var ErrFunctionNoEnd should have comment or be unexported (golint)
    • Line 820: warning: exported type FunctionBody should have comment or be unexported (golint)
    • Line 826: warning: exported method FunctionBody.UnmarshalWASM should have comment or be unexported (golint)
    • Line 867: warning: exported method FunctionBody.MarshalWASM should have comment or be unexported (golint)
    • Line 884: warning: exported type LocalEntry should have comment or be unexported (golint)
    • Line 889: warning: exported method LocalEntry.UnmarshalWASM should have comment or be unexported (golint)
    • Line 905: warning: exported method LocalEntry.MarshalWASM should have comment or be unexported (golint)
    • Line 921: warning: exported method SectionData.SectionID should have comment or be unexported (golint)
    • Line 925: warning: exported method SectionData.ReadPayload should have comment or be unexported (golint)
    • Line 939: warning: exported method SectionData.WritePayload should have comment or be unexported (golint)
    • Line 958: warning: exported method DataSegment.UnmarshalWASM should have comment or be unexported (golint)
    • Line 971: warning: exported method DataSegment.MarshalWASM should have comment or be unexported (golint)
    • Line 995: warning: exported const NameModule should have comment (or a comment on this block) or be unexported (golint)
    • Line 1006: warning: exported method NameSection.UnmarshalWASM should have comment or be unexported (golint)
    • Line 1023: warning: exported method NameSection.MarshalWASM should have comment or be unexported (golint)
    • Line 1085: warning: exported method ModuleName.UnmarshalWASM should have comment or be unexported (golint)
    • Line 1091: warning: exported method ModuleName.MarshalWASM should have comment or be unexported (golint)
    • Line 1102: warning: exported method FunctionNames.UnmarshalWASM should have comment or be unexported (golint)
    • Line 1107: warning: exported method FunctionNames.MarshalWASM should have comment or be unexported (golint)
    • Line 1119: warning: exported method LocalNames.UnmarshalWASM should have comment or be unexported (golint)
    • Line 1139: warning: exported method LocalNames.MarshalWASM should have comment or be unexported (golint)
    • Line 1167: warning: exported method NameMap.UnmarshalWASM should have comment or be unexported (golint)
    • Line 1185: warning: exported method NameMap.MarshalWASM should have comment or be unexported (golint)
    • paradigm-vm/pvm/engine/wasm/imports.go
    • Line 34: warning: exported type FuncImport should have comment or be unexported (golint)
    • Line 39: warning: exported method FuncImport.Kind should have comment or be unexported (golint)
    • Line 42: warning: exported method FuncImport.MarshalWASM should have comment or be unexported (golint)
    • Line 47: warning: exported type TableImport should have comment or be unexported (golint)
    • Line 52: warning: exported method TableImport.Kind should have comment or be unexported (golint)
    • Line 55: warning: exported method TableImport.MarshalWASM should have comment or be unexported (golint)
    • Line 59: warning: exported type MemoryImport should have comment or be unexported (golint)
    • Line 64: warning: exported method MemoryImport.Kind should have comment or be unexported (golint)
    • Line 67: warning: exported method MemoryImport.MarshalWASM should have comment or be unexported (golint)
    • Line 71: warning: exported type GlobalVarImport should have comment or be unexported (golint)
    • Line 76: warning: exported method GlobalVarImport.Kind should have comment or be unexported (golint)
    • Line 79: warning: exported method GlobalVarImport.MarshalWASM should have comment or be unexported (golint)
    • Line 84: warning: exported var ErrImportMutGlobal should have comment or be unexported (golint)
    • Line 88: warning: exported type InvalidExternalError should have comment or be unexported (golint)
    • Line 94: warning: exported type ExportNotFoundError should have comment or be unexported (golint)
    • Line 99: warning: exported type KindMismatchError should have comment or be unexported (golint)
    • Line 114: warning: exported type InvalidFunctionIndexError should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell92%

Misspell Finds commonly misspelled English words