Preparing report...

Report for github.com/goropikari/tlps

A+    Excellent!    Found 15 issues across 30 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!


gocyclo90%

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.

    • tlps/scanner.go
    • Line 81: warning: cyclomatic complexity 30 of function (*Scanner).scanToken() is high (> 15) (gocyclo)
    • tlps/interpreter.go
    • Line 47: warning: cyclomatic complexity 24 of function (*Interpreter).visitBinaryExpr() is high (> 15) (gocyclo)
    • tlps/parser.go
    • Line 135: warning: cyclomatic complexity 17 of function (*Parser).forStatement() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • tlps/native_function/print.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: exported type PrintFunc should have comment or be unexported (golint)
    • Line 7: warning: exported function NewPrintFunc should have comment or be unexported (golint)
    • Line 11: warning: exported method PrintFunc.Arity should have comment or be unexported (golint)
    • Line 15: warning: exported method PrintFunc.Call should have comment or be unexported (golint)
    • tlps/expr.go
    • Line 3: warning: exported type Expr should have comment or be unexported (golint)
    • Line 8: warning: exported type VisitorExpr should have comment or be unexported (golint)
    • Line 23: warning: exported type Assign should have comment or be unexported (golint)
    • Line 28: warning: exported function NewAssign should have comment or be unexported (golint)
    • Line 32: warning: exported method Assign.Accept should have comment or be unexported (golint)
    • Line 36: warning: exported method Assign.IsType should have comment or be unexported (golint)
    • Line 36: warning: receiver name rec should be consistent with previous receiver name a for Assign (golint)
    • Line 44: warning: exported type Binary should have comment or be unexported (golint)
    • Line 50: warning: exported function NewBinary should have comment or be unexported (golint)
    • Line 54: warning: exported method Binary.Accept should have comment or be unexported (golint)
    • Line 58: warning: exported method Binary.IsType should have comment or be unexported (golint)
    • Line 58: warning: receiver name rec should be consistent with previous receiver name b for Binary (golint)
    • Line 66: warning: exported type Call should have comment or be unexported (golint)
    • Line 72: warning: exported function NewCall should have comment or be unexported (golint)
    • Line 76: warning: exported method Call.Accept should have comment or be unexported (golint)
    • Line 80: warning: exported method Call.IsType should have comment or be unexported (golint)
    • Line 80: warning: receiver name rec should be consistent with previous receiver name c for Call (golint)
    • Line 88: warning: exported type Get should have comment or be unexported (golint)
    • Line 93: warning: exported function NewGet should have comment or be unexported (golint)
    • Line 97: warning: exported method Get.Accept should have comment or be unexported (golint)
    • Line 101: warning: exported method Get.IsType should have comment or be unexported (golint)
    • Line 101: warning: receiver name rec should be consistent with previous receiver name g for Get (golint)
    • Line 109: warning: exported type Grouping should have comment or be unexported (golint)
    • Line 113: warning: exported function NewGrouping should have comment or be unexported (golint)
    • Line 117: warning: exported method Grouping.Accept should have comment or be unexported (golint)
    • Line 121: warning: exported method Grouping.IsType should have comment or be unexported (golint)
    • Line 121: warning: receiver name rec should be consistent with previous receiver name g for Grouping (golint)
    • Line 129: warning: exported type Literal should have comment or be unexported (golint)
    • Line 133: warning: exported function NewLiteral should have comment or be unexported (golint)
    • Line 137: warning: exported method Literal.Accept should have comment or be unexported (golint)
    • Line 141: warning: exported method Literal.IsType should have comment or be unexported (golint)
    • Line 141: warning: receiver name rec should be consistent with previous receiver name l for Literal (golint)
    • Line 149: warning: exported type Logical should have comment or be unexported (golint)
    • Line 155: warning: exported function NewLogical should have comment or be unexported (golint)
    • Line 159: warning: exported method Logical.Accept should have comment or be unexported (golint)
    • Line 163: warning: exported method Logical.IsType should have comment or be unexported (golint)
    • Line 163: warning: receiver name rec should be consistent with previous receiver name l for Logical (golint)
    • Line 171: warning: exported type Set should have comment or be unexported (golint)
    • Line 177: warning: exported function NewSet should have comment or be unexported (golint)
    • Line 181: warning: exported method Set.Accept should have comment or be unexported (golint)
    • Line 185: warning: exported method Set.IsType should have comment or be unexported (golint)
    • Line 185: warning: receiver name rec should be consistent with previous receiver name s for Set (golint)
    • Line 193: warning: exported type Super should have comment or be unexported (golint)
    • Line 198: warning: exported function NewSuper should have comment or be unexported (golint)
    • Line 202: warning: exported method Super.Accept should have comment or be unexported (golint)
    • Line 206: warning: exported method Super.IsType should have comment or be unexported (golint)
    • Line 206: warning: receiver name rec should be consistent with previous receiver name s for Super (golint)
    • Line 214: warning: exported type This should have comment or be unexported (golint)
    • Line 218: warning: exported function NewThis should have comment or be unexported (golint)
    • Line 222: warning: exported method This.Accept should have comment or be unexported (golint)
    • Line 226: warning: exported method This.IsType should have comment or be unexported (golint)
    • Line 226: warning: receiver name rec should be consistent with previous receiver name t for This (golint)
    • Line 234: warning: exported type Unary should have comment or be unexported (golint)
    • Line 239: warning: exported function NewUnary should have comment or be unexported (golint)
    • Line 243: warning: exported method Unary.Accept should have comment or be unexported (golint)
    • Line 247: warning: exported method Unary.IsType should have comment or be unexported (golint)
    • Line 247: warning: receiver name rec should be consistent with previous receiver name u for Unary (golint)
    • Line 255: warning: exported type Variable should have comment or be unexported (golint)
    • Line 259: warning: exported function NewVariable should have comment or be unexported (golint)
    • Line 263: warning: exported method Variable.Accept should have comment or be unexported (golint)
    • Line 267: warning: exported method Variable.IsType should have comment or be unexported (golint)
    • Line 267: warning: receiver name rec should be consistent with previous receiver name v for Variable (golint)
    • tlps/stmt.go
    • Line 3: warning: exported type Stmt should have comment or be unexported (golint)
    • Line 8: warning: exported type VisitorStmt should have comment or be unexported (golint)
    • Line 20: warning: exported type Block should have comment or be unexported (golint)
    • Line 26: warning: exported function NewBlock should have comment or be unexported (golint)
    • Line 30: warning: exported method Block.Accept should have comment or be unexported (golint)
    • Line 34: warning: exported method Block.IsType should have comment or be unexported (golint)
    • Line 34: warning: receiver name rec should be consistent with previous receiver name b for Block (golint)
    • Line 42: warning: exported type Class should have comment or be unexported (golint)
    • Line 48: warning: exported function NewClass should have comment or be unexported (golint)
    • Line 52: warning: exported method Class.Accept should have comment or be unexported (golint)
    • Line 56: warning: exported method Class.IsType should have comment or be unexported (golint)
    • Line 56: warning: receiver name rec should be consistent with previous receiver name c for Class (golint)
    • Line 64: warning: exported type Expression should have comment or be unexported (golint)
    • Line 68: warning: exported function NewExpression should have comment or be unexported (golint)
    • Line 72: warning: exported method Expression.Accept should have comment or be unexported (golint)
    • Line 76: warning: exported method Expression.IsType should have comment or be unexported (golint)
    • Line 76: warning: receiver name rec should be consistent with previous receiver name e for Expression (golint)
    • Line 84: warning: exported type Function should have comment or be unexported (golint)
    • Line 90: warning: exported function NewFunction should have comment or be unexported (golint)
    • Line 94: warning: exported method Function.Accept should have comment or be unexported (golint)
    • Line 98: warning: exported method Function.IsType should have comment or be unexported (golint)
    • Line 98: warning: receiver name rec should be consistent with previous receiver name f for Function (golint)
    • Line 106: warning: exported type If should have comment or be unexported (golint)
    • Line 112: warning: exported function NewIf should have comment or be unexported (golint)
    • Line 116: warning: exported method If.Accept should have comment or be unexported (golint)
    • Line 120: warning: exported method If.IsType should have comment or be unexported (golint)
    • Line 120: warning: receiver name rec should be consistent with previous receiver name i for If (golint)
    • Line 128: warning: exported type Include should have comment or be unexported (golint)
    • Line 132: warning: exported function NewInclude should have comment or be unexported (golint)
    • Line 136: warning: exported method Include.Accept should have comment or be unexported (golint)
    • Line 140: warning: exported method Include.IsType should have comment or be unexported (golint)
    • Line 140: warning: receiver name rec should be consistent with previous receiver name i for Include (golint)
    • Line 148: warning: exported type Return should have comment or be unexported (golint)
    • Line 153: warning: exported function NewReturn should have comment or be unexported (golint)
    • Line 157: warning: exported method Return.Accept should have comment or be unexported (golint)
    • Line 161: warning: exported method Return.IsType should have comment or be unexported (golint)
    • Line 161: warning: receiver name rec should be consistent with previous receiver name r for Return (golint)
    • Line 169: warning: exported type Var should have comment or be unexported (golint)
    • Line 174: warning: exported function NewVar should have comment or be unexported (golint)
    • Line 178: warning: exported method Var.Accept should have comment or be unexported (golint)
    • Line 182: warning: exported method Var.IsType should have comment or be unexported (golint)
    • Line 182: warning: receiver name rec should be consistent with previous receiver name v for Var (golint)
    • Line 190: warning: exported type While should have comment or be unexported (golint)
    • Line 195: warning: exported function NewWhile should have comment or be unexported (golint)
    • Line 199: warning: exported method While.Accept should have comment or be unexported (golint)
    • Line 203: warning: exported method While.IsType should have comment or be unexported (golint)
    • Line 203: warning: receiver name rec should be consistent with previous receiver name w for While (golint)
    • tlps/tlps_class.go
    • Line 3: warning: exported type TLPSClass should have comment or be unexported (golint)
    • Line 9: warning: exported function NewTLPSClass should have comment or be unexported (golint)
    • Line 17: warning: exported method TLPSClass.FindMethod should have comment or be unexported (golint)
    • Line 29: warning: exported method TLPSClass.Call should have comment or be unexported (golint)
    • Line 41: warning: exported method TLPSClass.Arity should have comment or be unexported (golint)
    • tlps/tlps_instance.go
    • Line 3: warning: exported type TLPSInstance should have comment or be unexported (golint)
    • Line 8: warning: exported function NewTLPSInstance should have comment or be unexported (golint)
    • Line 15: warning: exported method TLPSInstance.Get should have comment or be unexported (golint)
    • Line 31: warning: exported method TLPSInstance.Set should have comment or be unexported (golint)
    • tlps/token.go
    • Line 9: warning: comment on exported const LeftParenTT should be of the form "LeftParenTT ..." (golint)
    • Line 11: warning: exported const RightParenTT should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported const BangTT should be of the form "BangTT ..." (golint)
    • Line 35: warning: comment on exported const IdentifierTT should be of the form "IdentifierTT ..." (golint)
    • Line 40: warning: comment on exported const AndTT should be of the form "AndTT ..." (golint)
    • tlps/native_function/os.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 11: warning: comment on exported type ExitFunc should be of the form "ExitFunc ..." (with optional leading article) (golint)
    • Line 14: warning: exported function NewExitFunc should have comment or be unexported (golint)
    • Line 18: warning: exported method ExitFunc.Arity should have comment or be unexported (golint)
    • Line 22: warning: exported method ExitFunc.Call should have comment or be unexported (golint)
    • tlps/block_type.go
    • Line 3: warning: exported type BlockType should have comment or be unexported (golint)
    • Line 6: warning: exported const NoneBlock should have comment (or a comment on this block) or be unexported (golint)
    • tlps/errors.go
    • Line 4: warning: exported var ParseError should have comment or be unexported (golint)
    • Line 8: warning: exported type CustomError should have comment or be unexported (golint)
    • Line 18: warning: exported method CustomError.New should have comment or be unexported (golint)
    • Line 22: warning: exported function NewCustomError should have comment or be unexported (golint)
    • tlps/resolver.go
    • Line 19: warning: exported const NoneFT should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported type ClassType should have comment or be unexported (golint)
    • Line 28: warning: exported const NoneCT should have comment (or a comment on this block) or be unexported (golint)
    • tlps/tlps_function.go
    • Line 52: warning: exported method TLPSFunction.Bind should have comment or be unexported (golint)
    • Line 52: warning: receiver name lc should be consistent with previous receiver name lf for TLPSFunction (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!