Preparing report...

Report for github.com/hyperjumptech/grule-rule-engine

(v1.13.0)

A+    Excellent!    Found 30 issues across 104 files

Tweet

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!


gofmt85%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo86%

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.

    • pkg/reflectools.go
    • Line 234: warning: cyclomatic complexity 29 of function SetAttributeValue() is high (> 15) (gocyclo)
    • Line 129: warning: cyclomatic complexity 18 of function ValueToInterface() is high (> 15) (gocyclo)
    • Line 463: warning: cyclomatic complexity 16 of function IsAttributeNilOrZero() is high (> 15) (gocyclo)
    • pkg/jsontool/JsonDom.go
    • Line 273: warning: cyclomatic complexity 18 of function (*JSONData).getByPath() is high (> 15) (gocyclo)
    • Line 215: warning: cyclomatic complexity 18 of function (*JSONData).validPathCheck() is high (> 15) (gocyclo)
    • pkg/reflectmath_test.go
    • Line 181: warning: cyclomatic complexity 41 of function TestValueAdd() is high (> 15) (gocyclo)
    • Line 269: warning: cyclomatic complexity 18 of function TestValueSub() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 18 of function TestValueMul() is high (> 15) (gocyclo)
    • Line 365: warning: cyclomatic complexity 18 of function TestValueDiv() is high (> 15) (gocyclo)
    • ast/Expression.go
    • Line 274: warning: cyclomatic complexity 36 of function (*Expression).Evaluate() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 21 of function (*Expression).GetSnapshot() is high (> 15) (gocyclo)
    • pkg/jsontool/JsonDom_test.go
    • Line 157: warning: cyclomatic complexity 22 of function TestJsonNodeOperations() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 16 of function TestJsonData_IsValidPath() is high (> 15) (gocyclo)
    • Line 104: warning: cyclomatic complexity 16 of function TestNewJsonObject() is high (> 15) (gocyclo)
    • ast/Variable.go
    • Line 208: warning: cyclomatic complexity 16 of function (*Variable).Evaluate() is high (> 15) (gocyclo)
    • Line 160: warning: cyclomatic complexity 16 of function (*Variable).Assign() is high (> 15) (gocyclo)
    • ast/Serializer.go
    • Line 104: warning: cyclomatic complexity 79 of function (*Catalog).BuildKnowledgeBase() is high (> 15) (gocyclo)
    • Line 546: warning: cyclomatic complexity 49 of function (*Catalog).ReadCatalogFromReader() is high (> 15) (gocyclo)
    • Line 754: warning: cyclomatic complexity 35 of function (*Catalog).WriteCatalogToWriter() is high (> 15) (gocyclo)
    • Line 459: warning: cyclomatic complexity 28 of function (*Catalog).Equals() is high (> 15) (gocyclo)
    • pkg/reflectmath.go
    • Line 165: warning: cyclomatic complexity 23 of function EvaluateAddition() is high (> 15) (gocyclo)
    • Line 645: warning: cyclomatic complexity 19 of function EvaluateEqual() is high (> 15) (gocyclo)
    • Line 718: warning: cyclomatic complexity 19 of function EvaluateNotEqual() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 18 of function EvaluateLesserThanEqual() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 18 of function EvaluateGreaterThanEqual() is high (> 15) (gocyclo)
    • Line 373: warning: cyclomatic complexity 17 of function EvaluateGreaterThan() is high (> 15) (gocyclo)
    • Line 441: warning: cyclomatic complexity 17 of function EvaluateLesserThan() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words