Preparing report...

Report for github.com/dengsgo/math-engine

A+    Excellent!    Found 5 issues across 8 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!


gocyclo87%

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.


golint37%

Golint is a linter for Go source code.

    • math-engine/engine/parser.go
    • Line 10: warning: exported const Identifier should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: comment on exported const Literal should be of the form "Literal ..." (golint)
    • Line 13: warning: comment on exported const Operator should be of the form "Operator ..." (golint)
    • Line 15: warning: comment on exported const COMMA should be of the form "COMMA ..." (golint)
    • Line 19: warning: exported type Token should have comment or be unexported (golint)
    • Line 29: warning: exported type Parser should have comment or be unexported (golint)
    • Line 38: warning: exported function Parse should have comment or be unexported (golint)
    • math-engine/engine/util.go
    • Line 12: warning: comment on exported function ParseAndExec should be of the form "ParseAndExec ..." (golint)
    • Line 36: warning: exported function ErrPos should have comment or be unexported (golint)
    • Line 46: warning: comment on exported function Pow should be of the form "Pow ..." (golint)
    • Line 128: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • math-engine/engine/ast.go
    • Line 11: warning: exported type ExprAST should have comment or be unexported (golint)
    • Line 15: warning: exported type NumberExprAST should have comment or be unexported (golint)
    • Line 20: warning: exported type BinaryExprAST should have comment or be unexported (golint)
    • Line 26: warning: exported type FunCallerExprAST should have comment or be unexported (golint)
    • Line 54: warning: exported type AST should have comment or be unexported (golint)
    • Line 65: warning: exported function NewAST should have comment or be unexported (golint)
    • Line 79: warning: exported method AST.ParseExpression should have comment or be unexported (golint)
    • Line 85: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 111: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 133: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 150: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 168: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 169: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 187: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 197: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 207: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 222: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • math-engine/engine/def.go
    • Line 6: warning: exported const RadianMode should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: comment on exported var TrigonometricMode should be of the form "TrigonometricMode ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign87%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!