Preparing report...

Report for github.com/Knetic/govaluate

B    Not bad!    Found 21 issues across 26 files

Tweet

gofmt65%

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!


golint46%

Golint is a linter for Go source code.

    • govaluate/expressionOutputStream.go
    • Line 16: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • govaluate/lexerState.go
    • Line 307: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • govaluate/tokenStream.go
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • govaluate/ExpressionToken.go
    • Line 3: warning: comment on exported type ExpressionToken should be of the form "ExpressionToken ..." (with optional leading article) (golint)
    • govaluate/TokenKind.go
    • Line 3: warning: comment on exported type TokenKind should be of the form "TokenKind ..." (with optional leading article) (golint)
    • Line 9: warning: exported const UNKNOWN should have comment (or a comment on this block) or be unexported (golint)
    • govaluate/EvaluableExpression.go
    • Line 11: warning: exported var DUMMY_PARAMETERS should have comment or be unexported (golint)
    • Line 13: warning: comment on exported type EvaluableExpression should be of the form "EvaluableExpression ..." (with optional leading article) (golint)
    • Line 40: warning: comment on exported function NewEvaluableExpression should be of the form "NewEvaluableExpression ..." (golint)
    • Line 50: warning: comment on exported function NewEvaluableExpressionFromTokens should be of the form "NewEvaluableExpressionFromTokens ..." (golint)
    • Line 86: warning: comment on exported function NewEvaluableExpressionWithFunctions should be of the form "NewEvaluableExpressionWithFunctions ..." (golint)
    • Line 128: warning: comment on exported method EvaluableExpression.Evaluate should be of the form "Evaluate ..." (golint)
    • Line 131: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 140: warning: comment on exported method EvaluableExpression.Eval should be of the form "Eval ..." (golint)
    • Line 151: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 166: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 249: warning: comment on exported method EvaluableExpression.Tokens should be of the form "Tokens ..." (golint)
    • Line 252: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 260: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 265: warning: comment on exported method EvaluableExpression.Vars should be of the form "Vars ..." (golint)
    • Line 268: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • govaluate/evaluationStage.go
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 57: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 67: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 180: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 353: warning: should omit 2nd value from range; this loop is equivalent to `for idx := range ...` (golint)
    • govaluate/lexerStream.go
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • govaluate/parameters.go
    • Line 7: warning: comment on exported type Parameters should be of the form "Parameters ..." (with optional leading article) (golint)
    • Line 20: warning: exported type MapParameters should have comment or be unexported (golint)
    • Line 22: warning: exported method MapParameters.Get should have comment or be unexported (golint)
    • govaluate/EvaluableExpression_sql.go
    • Line 10: warning: comment on exported method EvaluableExpression.ToSQLQuery should be of the form "ToSQLQuery ..." (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 44: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • govaluate/dummies_test.go
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 23: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 35: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 58: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • govaluate/OperatorSymbol.go
    • Line 3: warning: comment on exported type OperatorSymbol should be of the form "OperatorSymbol ..." (with optional leading article) (golint)
    • Line 10: warning: exported const VALUE should have comment (or a comment on this block) or be unexported (golint)
    • Line 223: warning: comment on exported method OperatorSymbol.IsModifierType should be of the form "IsModifierType ..." (golint)
    • Line 227: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 244: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)

gocyclo73%

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.

    • govaluate/OperatorSymbol.go
    • Line 70: warning: cyclomatic complexity 34 of function findOperatorPrecedenceForSymbol() is high (> 15) (gocyclo)
    • Line 244: warning: cyclomatic complexity 31 of function (OperatorSymbol).String() is high (> 15) (gocyclo)

ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!