Preparing report...

Report for github.com/arnodel/golua

A+    Excellent!    Found 29 issues across 161 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!


gocyclo88%

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.

    • golua/lib/golib/govalue.go
    • Line 234: warning: cyclomatic complexity 22 of function valueToType() is high (> 15) (gocyclo)
    • Line 68: warning: cyclomatic complexity 16 of function goSetIndex() is high (> 15) (gocyclo)
    • Line 13: warning: cyclomatic complexity 16 of function goIndex() is high (> 15) (gocyclo)
    • golua/scanner/states.go
    • Line 7: warning: cyclomatic complexity 25 of function scanToken() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 19 of function scanShortString() is high (> 15) (gocyclo)
    • golua/lib/stringlib/unpacker.go
    • Line 22: warning: cyclomatic complexity 63 of function UnpackString() is high (> 15) (gocyclo)
    • Line 238: warning: cyclomatic complexity 24 of function (*unpacker).readVarInt() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 16 of function (*unpacker).readVarUint() is high (> 15) (gocyclo)
    • golua/lib/tablelib/tablelib.go
    • Line 31: warning: cyclomatic complexity 19 of function concat() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 16 of function move() is high (> 15) (gocyclo)
    • Line 235: warning: cyclomatic complexity 16 of function remove() is high (> 15) (gocyclo)

golint91%

Golint is a linter for Go source code.

    • golua/ir/builder.go
    • Line 9: warning: exported type Name should have comment or be unexported (golint)
    • Line 11: warning: exported type RegData should have comment or be unexported (golint)
    • Line 18: warning: exported type CodeBuilder should have comment or be unexported (golint)
    • Line 32: warning: exported function NewCodeBuilder should have comment or be unexported (golint)
    • Line 40: warning: exported method CodeBuilder.NewChild should have comment or be unexported (golint)
    • Line 49: warning: exported method CodeBuilder.Dump should have comment or be unexported (golint)
    • Line 62: warning: exported method CodeBuilder.DeclareGotoLabel should have comment or be unexported (golint)
    • Line 72: warning: exported method CodeBuilder.EmitGotoLabel should have comment or be unexported (golint)
    • Line 80: warning: exported method CodeBuilder.GetNewLabel should have comment or be unexported (golint)
    • Line 86: warning: exported method CodeBuilder.EmitLabel should have comment or be unexported (golint)
    • Line 94: warning: exported method CodeBuilder.GetRegister should have comment or be unexported (golint)
    • Line 116: warning: exported method CodeBuilder.GetFreeRegister should have comment or be unexported (golint)
    • Line 122: warning: exported method CodeBuilder.TakeRegister should have comment or be unexported (golint)
    • Line 127: warning: exported method CodeBuilder.ReleaseRegister should have comment or be unexported (golint)
    • Line 135: warning: exported method CodeBuilder.PushContext should have comment or be unexported (golint)
    • Line 139: warning: exported method CodeBuilder.PopContext should have comment or be unexported (golint)
    • Line 159: warning: exported method CodeBuilder.EmitJump should have comment or be unexported (golint)
    • Line 173: warning: exported method CodeBuilder.DeclareLocal should have comment or be unexported (golint)
    • Line 178: warning: exported method CodeBuilder.EmitNoLine should have comment or be unexported (golint)
    • Line 182: warning: exported method CodeBuilder.Emit should have comment or be unexported (golint)
    • Line 187: warning: exported method CodeBuilder.Close should have comment or be unexported (golint)
    • Line 207: warning: exported function EmitConstant should have comment or be unexported (golint)
    • Line 211: warning: exported function EmitMoveNoLine should have comment or be unexported (golint)
    • Line 215: warning: exported function EmitMove should have comment or be unexported (golint)
    • golua/luatesting/linechecker.go
    • Line 12: warning: exported type LineChecker should have comment or be unexported (golint)
    • Line 21: warning: exported type LiteralLineChecker should have comment or be unexported (golint)
    • Line 23: warning: exported method LiteralLineChecker.CheckLine should have comment or be unexported (golint)
    • Line 31: warning: exported type RegexLineChecker should have comment or be unexported (golint)
    • Line 33: warning: exported method RegexLineChecker.CheckLine should have comment or be unexported (golint)
    • Line 41: warning: exported function ExtractLineCheckers should have comment or be unexported (golint)
    • Line 72: warning: exported function CheckLines should have comment or be unexported (golint)
    • golua/lib/base/base.go
    • Line 12: warning: exported function Load should have comment or be unexported (golint)
    • Line 40: warning: exported function ToString should have comment or be unexported (golint)
    • golua/token/token.go
    • Line 7: warning: exported type Token should have comment or be unexported (golint)
    • Line 20: warning: exported type Type should have comment or be unexported (golint)
    • Line 23: warning: exported const INVALID should have comment (or a comment on this block) or be unexported (golint)
    • Line 95: warning: exported method Type.IsBinOp should have comment or be unexported (golint)
    • Line 99: warning: exported type Pos should have comment or be unexported (golint)
    • golua/ircomp/ircomp.go
    • Line 8: warning: exported type ConstantCompiler should have comment or be unexported (golint)
    • Line 19: warning: exported function NewConstantCompiler should have comment or be unexported (golint)
    • Line 93: warning: exported method ConstantCompiler.GetConstant should have comment or be unexported (golint)
    • Line 97: warning: exported method ConstantCompiler.QueueConstant should have comment or be unexported (golint)
    • Line 107: warning: exported method ConstantCompiler.CompileQueue 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!


misspell98%

Misspell Finds commonly misspelled English words

    • golua/ops/ops.go
    • Line 42: warning: "Precendence" is a misspelling of "Precedence" (misspell)
    • Line 65: warning: "precendence" is a misspelling of "precedence" (misspell)