Preparing report...

Report for github.com/xav/go-script

(v0.0.0-20190211122227-2cdba5326fd6)

A+    Excellent!    Found 54 issues across 84 files

Tweet

gofmt98%

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


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!


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.

    • go-script/compiler/exprinfo.go
    • Line 458: warning: cyclomatic complexity 94 of function (*ExprInfo).compileBinaryExpr() is high (> 15) (gocyclo)
    • Line 691: warning: cyclomatic complexity 75 of function (*ExprInfo).compileBuiltinCallExpr() is high (> 15) (gocyclo)
    • Line 1399: warning: cyclomatic complexity 25 of function (*ExprInfo).compileSelectorExpr() is high (> 15) (gocyclo)
    • Line 1167: warning: cyclomatic complexity 25 of function (*ExprInfo).compileIndexExpr() is high (> 15) (gocyclo)
    • Line 160: warning: cyclomatic complexity 23 of function (*ExprInfo).compileCompositeStructType() is high (> 15) (gocyclo)
    • Line 1564: warning: cyclomatic complexity 20 of function (*ExprInfo).compileUnaryExpr() is high (> 15) (gocyclo)
    • Line 1300: warning: cyclomatic complexity 20 of function (*ExprInfo).compileSliceExpr() is high (> 15) (gocyclo)
    • go-script/compiler/stmtcompiler.go
    • Line 975: warning: cyclomatic complexity 48 of function (*stmtCompiler).doAssign() is high (> 15) (gocyclo)
    • Line 496: warning: cyclomatic complexity 30 of function (*stmtCompiler).compileSwitchStmt() is high (> 15) (gocyclo)
    • Line 50: warning: cyclomatic complexity 26 of function (*stmtCompiler).compile() is high (> 15) (gocyclo)
    • Line 847: warning: cyclomatic complexity 18 of function (*stmtCompiler).doConstAssign() is high (> 15) (gocyclo)
    • go-script/compiler/expr.go
    • Line 261: warning: cyclomatic complexity 34 of function (*Expr).asValue() is high (> 15) (gocyclo)
    • Line 62: warning: cyclomatic complexity 16 of function (*Expr).resolveIdeal() is high (> 15) (gocyclo)
    • go-script/compiler/exprops.go
    • Line 520: warning: cyclomatic complexity 34 of function (*Expr).genBinOpQuo() is high (> 15) (gocyclo)
    • Line 695: warning: cyclomatic complexity 27 of function (*Expr).genBinOpRem() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 23 of function (*Expr).genBinOpAdd() is high (> 15) (gocyclo)
    • Line 242: warning: cyclomatic complexity 22 of function (*Expr).genBinOpSub() is high (> 15) (gocyclo)
    • Line 381: warning: cyclomatic complexity 22 of function (*Expr).genBinOpMul() is high (> 15) (gocyclo)
    • Line 1157: warning: cyclomatic complexity 17 of function (*Expr).genBinOpAndNot() is high (> 15) (gocyclo)
    • Line 1049: warning: cyclomatic complexity 17 of function (*Expr).genBinOpXor() is high (> 15) (gocyclo)
    • Line 941: warning: cyclomatic complexity 17 of function (*Expr).genBinOpOr() is high (> 15) (gocyclo)
    • Line 833: warning: cyclomatic complexity 17 of function (*Expr).genBinOpAnd() is high (> 15) (gocyclo)
    • Line 1366: warning: cyclomatic complexity 16 of function (*Expr).genBinOpShr() is high (> 15) (gocyclo)
    • Line 1265: warning: cyclomatic complexity 16 of function (*Expr).genBinOpShl() is high (> 15) (gocyclo)

golint41%

Golint is a linter for Go source code.

    • go-script/vm/code.go
    • Line 17: warning: exported type CodeInstruction should have comment or be unexported (golint)
    • Line 18: warning: exported type Code should have comment or be unexported (golint)
    • Line 20: warning: exported method Code.Exec should have comment or be unexported (golint)
    • go-script/values/funcvalue.go
    • Line 19: warning: exported type Func should have comment or be unexported (golint)
    • Line 24: warning: exported type FuncValue should have comment or be unexported (golint)
    • Line 32: warning: exported type FuncV should have comment or be unexported (golint)
    • Line 40: warning: exported method FuncV.Assign should have comment or be unexported (golint)
    • Line 44: warning: exported method FuncV.Get should have comment or be unexported (golint)
    • Line 48: warning: exported method FuncV.Set should have comment or be unexported (golint)
    • go-script/values/idealfloatvalue.go
    • Line 25: warning: exported type IdealFloatValue should have comment or be unexported (golint)
    • Line 30: warning: exported type IdealFloatV should have comment or be unexported (golint)
    • Line 38: warning: exported method IdealFloatV.Assign should have comment or be unexported (golint)
    • Line 42: warning: exported method IdealFloatV.Get should have comment or be unexported (golint)
    • go-script/values/floatvalue.go
    • Line 23: warning: exported type FloatValue should have comment or be unexported (golint)
    • Line 31: warning: exported type Float32V should have comment or be unexported (golint)
    • Line 37: warning: exported method Float32V.Assign should have comment or be unexported (golint)
    • Line 41: warning: exported method Float32V.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Float32V.Set should have comment or be unexported (golint)
    • Line 51: warning: exported type Float64V should have comment or be unexported (golint)
    • Line 57: warning: exported method Float64V.Assign should have comment or be unexported (golint)
    • Line 61: warning: exported method Float64V.Get should have comment or be unexported (golint)
    • Line 65: warning: exported method Float64V.Set should have comment or be unexported (golint)
    • go-script/values/idealintvalue.go
    • Line 25: warning: exported type IdealIntValue should have comment or be unexported (golint)
    • Line 30: warning: exported type IdealIntV should have comment or be unexported (golint)
    • Line 38: warning: exported method IdealIntV.Assign should have comment or be unexported (golint)
    • Line 42: warning: exported method IdealIntV.Get should have comment or be unexported (golint)
    • go-script/types/complextype.go
    • Line 28: warning: exported method ComplexType.Compat should have comment or be unexported (golint)
    • Line 29: warning: exported method ComplexType.Lit should have comment or be unexported (golint)
    • Line 30: warning: exported method ComplexType.IsBoolean should have comment or be unexported (golint)
    • Line 31: warning: exported method ComplexType.IsInteger should have comment or be unexported (golint)
    • Line 32: warning: exported method ComplexType.IsFloat should have comment or be unexported (golint)
    • Line 33: warning: exported method ComplexType.IsIdeal should have comment or be unexported (golint)
    • Line 34: warning: exported method ComplexType.Zero should have comment or be unexported (golint)
    • go-script/values/arrayvalue.go
    • Line 19: warning: exported type ArrayValue should have comment or be unexported (golint)
    • Line 30: warning: exported type ArrayV should have comment or be unexported (golint)
    • Line 43: warning: exported method ArrayV.Assign should have comment or be unexported (golint)
    • Line 51: warning: exported method ArrayV.Get should have comment or be unexported (golint)
    • Line 55: warning: exported method ArrayV.Elem should have comment or be unexported (golint)
    • Line 59: warning: exported method ArrayV.Sub should have comment or be unexported (golint)
    • go-script/types/interfacetype.go
    • Line 30: warning: exported type InterfaceType should have comment or be unexported (golint)
    • Line 123: warning: exported method InterfaceType.Compat should have comment or be unexported (golint)
    • Line 140: warning: exported method InterfaceType.Lit should have comment or be unexported (golint)
    • Line 144: warning: exported method InterfaceType.Zero should have comment or be unexported (golint)
    • go-script/values/slicevalue.go
    • Line 19: warning: exported type Slice should have comment or be unexported (golint)
    • Line 25: warning: exported type SliceValue should have comment or be unexported (golint)
    • Line 33: warning: exported type SliceV should have comment or be unexported (golint)
    • Line 44: warning: exported method SliceV.Assign should have comment or be unexported (golint)
    • Line 48: warning: exported method SliceV.Get should have comment or be unexported (golint)
    • Line 52: warning: exported method SliceV.Set should have comment or be unexported (golint)
    • go-script/values/uintvalue.go
    • Line 23: warning: exported type UintValue should have comment or be unexported (golint)
    • Line 31: warning: exported type Uint8V should have comment or be unexported (golint)
    • Line 37: warning: exported method Uint8V.Assign should have comment or be unexported (golint)
    • Line 41: warning: exported method Uint8V.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Uint8V.Set should have comment or be unexported (golint)
    • Line 51: warning: exported type Uint16V should have comment or be unexported (golint)
    • Line 57: warning: exported method Uint16V.Assign should have comment or be unexported (golint)
    • Line 61: warning: exported method Uint16V.Get should have comment or be unexported (golint)
    • Line 65: warning: exported method Uint16V.Set should have comment or be unexported (golint)
    • Line 71: warning: exported type Uint32V should have comment or be unexported (golint)
    • Line 77: warning: exported method Uint32V.Assign should have comment or be unexported (golint)
    • Line 81: warning: exported method Uint32V.Get should have comment or be unexported (golint)
    • Line 85: warning: exported method Uint32V.Set should have comment or be unexported (golint)
    • Line 91: warning: exported type Uint64V should have comment or be unexported (golint)
    • Line 97: warning: exported method Uint64V.Assign should have comment or be unexported (golint)
    • Line 101: warning: exported method Uint64V.Get should have comment or be unexported (golint)
    • Line 105: warning: exported method Uint64V.Set should have comment or be unexported (golint)
    • Line 111: warning: exported type UintV should have comment or be unexported (golint)
    • Line 117: warning: exported method UintV.Assign should have comment or be unexported (golint)
    • Line 121: warning: exported method UintV.Get should have comment or be unexported (golint)
    • Line 125: warning: exported method UintV.Set should have comment or be unexported (golint)
    • Line 131: warning: exported type UintptrV should have comment or be unexported (golint)
    • Line 137: warning: exported method UintptrV.Assign should have comment or be unexported (golint)
    • Line 141: warning: exported method UintptrV.Get should have comment or be unexported (golint)
    • Line 145: warning: exported method UintptrV.Set should have comment or be unexported (golint)
    • go-script/values/stringvalue.go
    • Line 23: warning: exported type StringValue should have comment or be unexported (golint)
    • Line 31: warning: exported type StringV should have comment or be unexported (golint)
    • Line 37: warning: exported method StringV.Assign should have comment or be unexported (golint)
    • Line 41: warning: exported method StringV.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method StringV.Set should have comment or be unexported (golint)
    • go-script/values/multiv.go
    • Line 19: warning: exported type MultiV should have comment or be unexported (golint)
    • Line 32: warning: exported method MultiV.Assign should have comment or be unexported (golint)
    • go-script/types/chantype.go
    • Line 26: warning: exported method ChanType.Compat should have comment or be unexported (golint)
    • Line 27: warning: exported method ChanType.Lit should have comment or be unexported (golint)
    • Line 28: warning: exported method ChanType.IsBoolean should have comment or be unexported (golint)
    • Line 29: warning: exported method ChanType.IsInteger should have comment or be unexported (golint)
    • Line 30: warning: exported method ChanType.IsFloat should have comment or be unexported (golint)
    • Line 31: warning: exported method ChanType.IsIdeal should have comment or be unexported (golint)
    • Line 32: warning: exported method ChanType.Zero should have comment or be unexported (golint)
    • go-script/values/complexvalue.go
    • Line 21: warning: exported type ComplexValue should have comment or be unexported (golint)
    • Line 27: warning: exported type Complex64V should have comment or be unexported (golint)
    • Line 30: warning: exported method Complex64V.Assign should have comment or be unexported (golint)
    • Line 34: warning: exported type Complex128V should have comment or be unexported (golint)
    • Line 37: warning: exported method Complex128V.Assign should have comment or be unexported (golint)
    • go-script/values/interface.go
    • Line 19: warning: exported type Interface should have comment or be unexported (golint)
    • Line 24: warning: exported type InterfaceValue should have comment or be unexported (golint)
    • Line 32: warning: exported type InterfaceV should have comment or be unexported (golint)
    • Line 43: warning: exported method InterfaceV.Assign should have comment or be unexported (golint)
    • Line 47: warning: exported method InterfaceV.Get should have comment or be unexported (golint)
    • Line 51: warning: exported method InterfaceV.Set should have comment or be unexported (golint)
    • go-script/values/boolvalue.go
    • Line 23: warning: exported type BoolValue should have comment or be unexported (golint)
    • Line 32: warning: exported type BoolV should have comment or be unexported (golint)
    • Line 38: warning: exported method BoolV.Assign should have comment or be unexported (golint)
    • Line 42: warning: exported method BoolV.GetIdeal should have comment or be unexported (golint)
    • Line 46: warning: exported method BoolV.Get should have comment or be unexported (golint)
    • Line 50: warning: exported method BoolV.Set should have comment or be unexported (golint)
    • go-script/values/mapvalue.go
    • Line 23: warning: exported type Map should have comment or be unexported (golint)
    • Line 30: warning: exported type MapValue should have comment or be unexported (golint)
    • Line 38: warning: exported type MapV should have comment or be unexported (golint)
    • Line 59: warning: exported method MapV.Assign should have comment or be unexported (golint)
    • Line 63: warning: exported method MapV.Get should have comment or be unexported (golint)
    • Line 67: warning: exported method MapV.Set should have comment or be unexported (golint)
    • go-script/vm/evalfunc.go
    • Line 24: warning: exported method EvalFunc.NewFrame should have comment or be unexported (golint)
    • Line 28: warning: exported method EvalFunc.Call should have comment or be unexported (golint)
    • go-script/compiler/evalmap.go
    • Line 19: warning: exported type EvalMap should have comment or be unexported (golint)
    • Line 21: warning: exported method EvalMap.Len should have comment or be unexported (golint)
    • Line 25: warning: exported method EvalMap.Elem should have comment or be unexported (golint)
    • Line 29: warning: exported method EvalMap.SetElem should have comment or be unexported (golint)
    • Line 37: warning: exported method EvalMap.Iter should have comment or be unexported (golint)
    • go-script/values/intvalue.go
    • Line 23: warning: exported type IntValue should have comment or be unexported (golint)
    • Line 31: warning: exported type Int8V should have comment or be unexported (golint)
    • Line 37: warning: exported method Int8V.Assign should have comment or be unexported (golint)
    • Line 41: warning: exported method Int8V.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Int8V.Set should have comment or be unexported (golint)
    • Line 51: warning: exported type Int16V should have comment or be unexported (golint)
    • Line 57: warning: exported method Int16V.Assign should have comment or be unexported (golint)
    • Line 61: warning: exported method Int16V.Get should have comment or be unexported (golint)
    • Line 65: warning: exported method Int16V.Set should have comment or be unexported (golint)
    • Line 71: warning: exported type Int32V should have comment or be unexported (golint)
    • Line 77: warning: exported method Int32V.Assign should have comment or be unexported (golint)
    • Line 81: warning: exported method Int32V.Get should have comment or be unexported (golint)
    • Line 85: warning: exported method Int32V.Set should have comment or be unexported (golint)
    • Line 91: warning: exported type Int64V should have comment or be unexported (golint)
    • Line 97: warning: exported method Int64V.Assign should have comment or be unexported (golint)
    • Line 101: warning: exported method Int64V.Get should have comment or be unexported (golint)
    • Line 105: warning: exported method Int64V.Set should have comment or be unexported (golint)
    • Line 111: warning: exported type IntV should have comment or be unexported (golint)
    • Line 117: warning: exported method IntV.Assign should have comment or be unexported (golint)
    • Line 121: warning: exported method IntV.Get should have comment or be unexported (golint)
    • Line 125: warning: exported method IntV.Set should have comment or be unexported (golint)
    • go-script/values/ptrvalue.go
    • Line 19: warning: exported type PtrValue should have comment or be unexported (golint)
    • Line 27: warning: exported type PtrV should have comment or be unexported (golint)
    • Line 38: warning: exported method PtrV.Assign should have comment or be unexported (golint)
    • Line 42: warning: exported method PtrV.Get should have comment or be unexported (golint)
    • Line 46: warning: exported method PtrV.Set should have comment or be unexported (golint)
    • go-script/values/structvalue.go
    • Line 19: warning: exported type StructValue should have comment or be unexported (golint)
    • Line 29: warning: exported type StructV should have comment or be unexported (golint)
    • Line 42: warning: exported method StructV.Assign should have comment or be unexported (golint)
    • Line 50: warning: exported method StructV.Get should have comment or be unexported (golint)
    • Line 54: warning: exported method StructV.Field should have comment or be unexported (golint)
    • go-script/types/multitype.go
    • Line 24: warning: exported var EmptyType should have comment or be unexported (golint)
    • Line 33: warning: exported function NewMultiType should have comment or be unexported (golint)
    • go-script/compiler/codebuf.go
    • Line 19: warning: exported type CodeBuf should have comment or be unexported (golint)
    • Line 23: warning: exported function NewCodeBuf should have comment or be unexported (golint)
    • Line 27: warning: exported method CodeBuf.Push should have comment or be unexported (golint)
    • Line 31: warning: exported method CodeBuf.NextPC should have comment or be unexported (golint)
    • Line 35: warning: exported method CodeBuf.Get should have comment or be unexported (golint)
    • go-script/compiler/flowbuf.go
    • Line 23: warning: exported type FlowBuf should have comment or be unexported (golint)
    • Line 33: warning: exported type FlowBlock should have comment or be unexported (golint)
    • Line 39: warning: exported type FlowEnt should have comment or be unexported (golint)
    • go-script/values/packagevalue.go
    • Line 23: warning: exported type PackageValue should have comment or be unexported (golint)
    • Line 31: warning: exported type PackageV should have comment or be unexported (golint)
    • Line 40: warning: exported method PackageV.Assign should have comment or be unexported (golint)
    • Line 44: warning: exported method PackageV.Get should have comment or be unexported (golint)
    • Line 48: warning: exported method PackageV.Ident should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!