Preparing report...

Report for github.com/perlin-network/life

A    Great!    Found 17 issues across 25 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!


gocyclo68%

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.

    • life/compiler/cfg.go
    • Line 71: warning: cyclomatic complexity 21 of function (*SSAFunctionCompiler).NewCFGraph() is high (> 15) (gocyclo)
    • life/exec/vm.go
    • Line 823: warning: cyclomatic complexity 252 of function (*VirtualMachine).Execute() is high (> 15) (gocyclo)
    • Line 420: warning: cyclomatic complexity 33 of function NewVirtualMachine() is high (> 15) (gocyclo)
    • Line 131: warning: cyclomatic complexity 25 of function NewModule() is high (> 15) (gocyclo)

golint40%

Golint is a linter for Go source code.

    • life/compiler/opcodes/opcodes.go
    • Line 8: warning: exported type Opcode should have comment or be unexported (golint)
    • Line 11: warning: exported const Nop should have comment (or a comment on this block) or be unexported (golint)
    • life/platform/aot_unix.go
    • Line 146: warning: exported type AOTContext should have comment or be unexported (golint)
    • Line 163: warning: exported method AOTContext.Initialize should have comment or be unexported (golint)
    • Line 175: warning: exported method AOTContext.UnsafeInvokeFunction_0 should have comment or be unexported (golint)
    • Line 175: warning: don't use underscores in Go names; method UnsafeInvokeFunction_0 should be UnsafeInvokeFunction0 (golint)
    • Line 182: warning: exported method AOTContext.UnsafeInvokeFunction_1 should have comment or be unexported (golint)
    • Line 182: warning: don't use underscores in Go names; method UnsafeInvokeFunction_1 should be UnsafeInvokeFunction1 (golint)
    • Line 190: warning: exported method AOTContext.UnsafeInvokeFunction_2 should have comment or be unexported (golint)
    • Line 190: warning: don't use underscores in Go names; method UnsafeInvokeFunction_2 should be UnsafeInvokeFunction2 (golint)
    • Line 199: warning: exported function FullAOTCompile should have comment or be unexported (golint)
    • Line 254: warning: exported function FullAOTCompileModule should have comment or be unexported (golint)
    • life/compiler/liveness.go
    • Line 5: warning: comment on exported method SSAFunctionCompiler.RegAlloc should be of the form "RegAlloc ..." (golint)
    • Line 45: warning: exported method Instr.BranchTargets should have comment or be unexported (golint)
    • life/compiler/ngen.go
    • Line 8: warning: exported const NGEN_FUNCTION_PREFIX should have comment or be unexported (golint)
    • Line 9: warning: exported const NGEN_LOCAL_PREFIX should have comment or be unexported (golint)
    • Line 10: warning: exported const NGEN_VALUE_PREFIX should have comment or be unexported (golint)
    • Line 11: warning: exported const NGEN_INS_LABEL_PREFIX should have comment or be unexported (golint)
    • Line 12: warning: exported const NGEN_ENV_API_PREFIX should have comment or be unexported (golint)
    • Line 13: warning: exported const NGEN_HEADER should have comment or be unexported (golint)
    • Line 77: warning: exported const NGEN_FP_HEADER should have comment or be unexported (golint)
    • Line 132: warning: don't use underscores in Go names; func writeUnOp_Eqz should be writeUnOpEqz (golint)
    • Line 140: warning: don't use underscores in Go names; func writeUnOp_Fcall should be writeUnOpFcall (golint)
    • Line 149: warning: don't use underscores in Go names; func writeBinOp_Shift should be writeBinOpShift (golint)
    • Line 160: warning: don't use underscores in Go names; func writeBinOp_Fcall should be writeBinOpFcall (golint)
    • Line 170: warning: don't use underscores in Go names; func writeBinOp_ConstRv should be writeBinOpConstRv (golint)
    • Line 216: warning: exported method SSAFunctionCompiler.NGen should have comment or be unexported (golint)
    • life/compiler/ssa.go
    • Line 12: warning: exported type TyValueID should have comment or be unexported (golint)
    • Line 32: warning: exported type Location should have comment or be unexported (golint)
    • Line 43: warning: exported type FixupInfo should have comment or be unexported (golint)
    • Line 68: warning: exported method SSAFunctionCompiler.NextValueID should have comment or be unexported (golint)
    • Line 73: warning: exported method SSAFunctionCompiler.PopStack should have comment or be unexported (golint)
    • Line 84: warning: exported method SSAFunctionCompiler.PushStack should have comment or be unexported (golint)
    • Line 96: warning: exported method SSAFunctionCompiler.FixupLocationRef should have comment or be unexported (golint)
    • Line 129: warning: exported method SSAFunctionCompiler.FilterFloatingPoint should have comment or be unexported (golint)
    • life/spec/test_runner/runner.go
    • Line 14: warning: exported type Resolver should have comment or be unexported (golint)
    • Line 16: warning: exported method Resolver.ResolveFunc should have comment or be unexported (golint)
    • Line 28: warning: exported method Resolver.ResolveGlobal should have comment or be unexported (golint)
    • Line 40: warning: exported type Config should have comment or be unexported (golint)
    • Line 45: warning: exported type Command should have comment or be unexported (golint)
    • Line 56: warning: exported type CmdAction should have comment or be unexported (golint)
    • Line 64: warning: exported type ValueInfo should have comment or be unexported (golint)
    • Line 69: warning: exported function LoadConfigFromFile should have comment or be unexported (golint)
    • Line 82: warning: exported method Config.Run should have comment or be unexported (golint)
    • life/compiler/module.go
    • Line 16: warning: exported type Module should have comment or be unexported (golint)
    • Line 22: warning: exported type InterpreterCode should have comment or be unexported (golint)
    • Line 32: warning: exported function LoadModule should have comment or be unexported (golint)
    • Line 117: warning: exported method Module.CompileWithNGen should have comment or be unexported (golint)
    • Line 206: warning: exported method Module.CompileForInterpreter should have comment or be unexported (golint)
    • life/exec/snapshot.go
    • Line 5: warning: exported method VirtualMachine.ReadSnapshot should have comment or be unexported (golint)
    • Line 36: warning: exported method VirtualMachine.WriteSnapshot should have comment or be unexported (golint)
    • Line 82: warning: exported type Snapshot should have comment or be unexported (golint)
    • life/exec/vm.go
    • Line 18: warning: exported type FunctionImport should have comment or be unexported (golint)
    • Line 34: warning: exported type FunctionImportInfo should have comment or be unexported (golint)
    • Line 40: warning: exported type NCompileConfig should have comment or be unexported (golint)
    • Line 45: warning: exported type AOTService should have comment or be unexported (golint)
    • Line 110: warning: exported type Module should have comment or be unexported (golint)
    • Line 268: warning: exported method Module.GenerateNEnv should have comment or be unexported (golint)
    • Line 339: warning: exported method Module.NBuildAliasDef should have comment or be unexported (golint)
    • Line 355: warning: exported method Module.NCompile should have comment or be unexported (golint)
    • Line 558: warning: exported method VirtualMachine.SetAOTService should have comment or be unexported (golint)
    • Line 593: warning: exported method VirtualMachine.GenerateNEnv should have comment or be unexported (golint)
    • Line 664: warning: exported method VirtualMachine.NBuildAliasDef should have comment or be unexported (golint)
    • Line 680: warning: exported method VirtualMachine.NCompile should have comment or be unexported (golint)
    • Line 800: warning: exported method VirtualMachine.AddAndCheckGas should have comment or be unexported (golint)
    • life/compiler/gas_policy.go
    • Line 3: warning: exported type GasPolicy should have comment or be unexported (golint)
    • Line 7: warning: exported type SimpleGasPolicy should have comment or be unexported (golint)
    • Line 11: warning: exported method SimpleGasPolicy.GetCost should have comment or be unexported (golint)
    • life/exec/helpers.go
    • Line 16: warning: exported method NopResolver.ResolveFunc should have comment or be unexported (golint)
    • Line 20: warning: exported method NopResolver.ResolveGlobal should have comment or be unexported (golint)
    • life/compiler/cfg.go
    • Line 3: warning: exported type CFGraph should have comment or be unexported (golint)
    • Line 7: warning: exported type BasicBlock should have comment or be unexported (golint)
    • Line 16: warning: exported type TyJmpKind should have comment or be unexported (golint)
    • Line 19: warning: exported const JmpUndef should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported method CFGraph.ToInsSeq should have comment or be unexported (golint)
    • Line 71: warning: exported method SSAFunctionCompiler.NewCFGraph should have comment or be unexported (golint)
    • life/compiler/gas.go
    • Line 3: warning: exported method SSAFunctionCompiler.InsertGasCounters 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!