Report for github.com/ffenix113/expr

A    Great!    Found 31 issues across 48 files

Tweet

gofmt97%

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!


gocyclo77%

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.

    • expr/vm/program.go
    • Line 18: warning: cyclomatic complexity 55 of function (*Program).Disassemble() is high (> 15) (gocyclo)
    • expr/compiler/compiler.go
    • Line 267: warning: cyclomatic complexity 26 of function (*compiler).BinaryNode() is high (> 15) (gocyclo)
    • Line 119: warning: cyclomatic complexity 24 of function (*compiler).compile() is high (> 15) (gocyclo)
    • expr/checker/checker.go
    • Line 182: warning: cyclomatic complexity 41 of function (*visitor).BinaryNode() is high (> 15) (gocyclo)
    • Line 443: warning: cyclomatic complexity 34 of function (*visitor).BuiltinNode() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 23 of function (*visitor).visit() is high (> 15) (gocyclo)
    • Line 373: warning: cyclomatic complexity 17 of function (*visitor).checkFunc() is high (> 15) (gocyclo)
    • Line 327: warning: cyclomatic complexity 16 of function (*visitor).FunctionNode() is high (> 15) (gocyclo)
    • expr/vm/vm.go
    • Line 50: warning: cyclomatic complexity 85 of function (*VM).Run() is high (> 15) (gocyclo)

golint35%

Golint is a linter for Go source code.

    • expr/vm/opcodes.go
    • Line 4: warning: exported const OpPush should have comment (or a comment on this block) or be unexported (golint)
    • expr/file/error.go
    • Line 9: warning: exported type Error should have comment or be unexported (golint)
    • Line 19: warning: exported method Error.Bind should have comment or be unexported (golint)
    • expr/file/location.go
    • Line 3: warning: exported type Location should have comment or be unexported (golint)
    • Line 8: warning: exported method Location.Empty should have comment or be unexported (golint)
    • expr/conf/config.go
    • Line 11: warning: exported type Config should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 77: warning: exported method Config.ConstExpr should have comment or be unexported (golint)
    • expr/conf/types_table.go
    • Line 5: warning: exported type Tag should have comment or be unexported (golint)
    • Line 11: warning: exported type TypesTable should have comment or be unexported (golint)
    • Line 63: warning: exported function FieldsFromStruct should have comment or be unexported (golint)
    • expr/vm/program.go
    • Line 11: warning: exported type Program should have comment or be unexported (golint)
    • Line 18: warning: exported method Program.Disassemble should have comment or be unexported (golint)
    • expr/parser/parser.go
    • Line 10: warning: should not use dot imports (golint)
    • Line 12: warning: should not use dot imports (golint)
    • Line 83: warning: exported type Tree should have comment or be unexported (golint)
    • Line 88: warning: exported function Parse should have comment or be unexported (golint)
    • expr/ast/visitor.go
    • Line 5: warning: exported type Visitor should have comment or be unexported (golint)
    • Line 14: warning: exported function Walk should have comment or be unexported (golint)
    • expr/parser/lexer/utils.go
    • Line 10: warning: exported function IsSpace should have comment or be unexported (golint)
    • Line 14: warning: exported function IsAlphaNumeric should have comment or be unexported (golint)
    • Line 18: warning: exported function IsAlphabetic should have comment or be unexported (golint)
    • expr/checker/types.go
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 244: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • expr/ast/node.go
    • Line 18: warning: exported function Patch should have comment or be unexported (golint)
    • Line 45: warning: exported type NilNode should have comment or be unexported (golint)
    • Line 49: warning: exported type IdentifierNode should have comment or be unexported (golint)
    • Line 54: warning: exported type IntegerNode should have comment or be unexported (golint)
    • Line 59: warning: exported type FloatNode should have comment or be unexported (golint)
    • Line 64: warning: exported type BoolNode should have comment or be unexported (golint)
    • Line 69: warning: exported type StringNode should have comment or be unexported (golint)
    • Line 74: warning: exported type ConstantNode should have comment or be unexported (golint)
    • Line 79: warning: exported type UnaryNode should have comment or be unexported (golint)
    • Line 85: warning: exported type BinaryNode should have comment or be unexported (golint)
    • Line 92: warning: exported type MatchesNode should have comment or be unexported (golint)
    • Line 99: warning: exported type PropertyNode should have comment or be unexported (golint)
    • Line 105: warning: exported type IndexNode should have comment or be unexported (golint)
    • Line 111: warning: exported type SliceNode should have comment or be unexported (golint)
    • Line 118: warning: exported type MethodNode should have comment or be unexported (golint)
    • Line 125: warning: exported type FunctionNode should have comment or be unexported (golint)
    • Line 132: warning: exported type BuiltinNode should have comment or be unexported (golint)
    • Line 138: warning: exported type ClosureNode should have comment or be unexported (golint)
    • Line 143: warning: exported type PointerNode should have comment or be unexported (golint)
    • Line 147: warning: exported type ConditionalNode should have comment or be unexported (golint)
    • Line 154: warning: exported type ArrayNode should have comment or be unexported (golint)
    • Line 159: warning: exported type MapNode should have comment or be unexported (golint)
    • Line 164: warning: exported type PairNode should have comment or be unexported (golint)
    • expr/parser/lexer/token.go
    • Line 9: warning: exported type Kind should have comment or be unexported (golint)
    • Line 12: warning: exported const Identifier should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Token should have comment or be unexported (golint)
    • Line 33: warning: exported method Token.Is should have comment or be unexported (golint)
    • expr/file/source.go
    • Line 9: warning: exported type Source should have comment or be unexported (golint)
    • Line 14: warning: exported function NewSource should have comment or be unexported (golint)
    • Line 22: warning: exported method Source.MarshalJSON should have comment or be unexported (golint)
    • Line 26: warning: exported method Source.UnmarshalJSON should have comment or be unexported (golint)
    • Line 38: warning: exported method Source.Content should have comment or be unexported (golint)
    • Line 42: warning: exported method Source.Snippet should have comment or be unexported (golint)
    • expr/vm/runtime.go
    • Line 11: warning: exported type Call should have comment or be unexported (golint)
    • Line 16: warning: exported type Scope should have comment or be unexported (golint)
    • Line 88: warning: exported function FetchFn should have comment or be unexported (golint)
    • expr/vm/vm.go
    • Line 15: warning: exported var MemoryBudget should have comment or be unexported (golint)
    • Line 18: warning: exported function Run should have comment or be unexported (golint)
    • Line 27: warning: exported type VM should have comment or be unexported (golint)
    • Line 41: warning: exported function Debug should have comment or be unexported (golint)
    • Line 50: warning: exported method VM.Run should have comment or be unexported (golint)
    • Line 436: warning: exported method VM.Stack should have comment or be unexported (golint)
    • Line 440: warning: exported method VM.Scope should have comment or be unexported (golint)
    • Line 447: warning: exported method VM.Step should have comment or be unexported (golint)
    • Line 453: warning: exported method VM.Position should have comment or be unexported (golint)
    • expr/docgen/docgen.go
    • Line 20: warning: exported type Context should have comment or be unexported (golint)
    • Line 26: warning: exported type Type should have comment or be unexported (golint)
    • Line 37: warning: exported var Operators should have comment or be unexported (golint)
    • Line 52: warning: exported function CreateDoc 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!