Preparing report...

Report for github.com/semihalev/twig

(v1.0.3)

A+    Excellent!    Found 14 issues across 63 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!


gofmt100%

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

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.

    • parse_macro.go
    • Line 9: warning: cyclomatic complexity 72 of function (*Parser).parseMacro() is high (> 15) (gocyclo)
    • parse_if.go
    • Line 12: warning: cyclomatic complexity 25 of function (*Parser).parseIf() is high (> 15) (gocyclo)
    • extension.go
    • Line 1498: warning: cyclomatic complexity 40 of function (*CoreExtension).filterSlice() is high (> 15) (gocyclo)
    • Line 391: warning: cyclomatic complexity 25 of function (*CoreExtension).filterDate() is high (> 15) (gocyclo)
    • Line 2134: warning: cyclomatic complexity 18 of function (*CoreExtension).functionMerge() is high (> 15) (gocyclo)
    • Line 1877: warning: cyclomatic complexity 16 of function (*CoreExtension).filterNumberFormat() is high (> 15) (gocyclo)
    • Line 569: warning: cyclomatic complexity 16 of function (*CoreExtension).functionDate() is high (> 15) (gocyclo)
    • Line 1167: warning: cyclomatic complexity 16 of function contains() is high (> 15) (gocyclo)
    • parse_block.go
    • Line 5: warning: cyclomatic complexity 16 of function (*Parser).parseBlock() is high (> 15) (gocyclo)
    • render.go
    • Line 535: warning: cyclomatic complexity 99 of function (*RenderContext).EvaluateExpression() is high (> 15) (gocyclo)
    • Line 1250: warning: cyclomatic complexity 64 of function (*RenderContext).evaluateBinaryOp() is high (> 15) (gocyclo)
    • Line 1466: warning: cyclomatic complexity 26 of function (*RenderContext).contains() is high (> 15) (gocyclo)
    • Line 1095: warning: cyclomatic complexity 24 of function (*RenderContext).getAttribute() is high (> 15) (gocyclo)
    • Line 1592: warning: cyclomatic complexity 21 of function (*RenderContext).toNumber() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 19 of function (*RenderContext).GetVariable() is high (> 15) (gocyclo)
    • Line 1018: warning: cyclomatic complexity 16 of function (*RenderContext).getItem() is high (> 15) (gocyclo)
    • parser.go
    • Line 929: warning: cyclomatic complexity 75 of function (*Parser).parseBinaryExpression() is high (> 15) (gocyclo)
    • Line 419: warning: cyclomatic complexity 68 of function (*Parser).parseSimpleExpression() is high (> 15) (gocyclo)
    • Line 175: warning: cyclomatic complexity 35 of function (*Parser).parseOuterTemplate() is high (> 15) (gocyclo)
    • Line 300: warning: cyclomatic complexity 28 of function (*Parser).parseExpression() is high (> 15) (gocyclo)
    • Line 818: warning: cyclomatic complexity 20 of function (*Parser).parseFilters() is high (> 15) (gocyclo)
    • Line 747: warning: cyclomatic complexity 16 of function (*Parser).parseMapExpression() is high (> 15) (gocyclo)
    • html_preserving_tokenizer.go
    • Line 30: warning: cyclomatic complexity 72 of function (*Parser).htmlPreservingTokenize() is high (> 15) (gocyclo)
    • Line 892: warning: cyclomatic complexity 60 of function (*Parser).tokenizeExpression() is high (> 15) (gocyclo)
    • Line 428: warning: cyclomatic complexity 57 of function tokenizeObjectContents() is high (> 15) (gocyclo)
    • Line 774: warning: cyclomatic complexity 35 of function extractParams() is high (> 15) (gocyclo)
    • Line 646: warning: cyclomatic complexity 22 of function splitArrayElements() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 19 of function tokenizeArrayElements() is high (> 15) (gocyclo)
    • parser_include.go
    • Line 8: warning: cyclomatic complexity 47 of function (*Parser).parseInclude() is high (> 15) (gocyclo)
    • parse_verbatim.go
    • Line 9: warning: cyclomatic complexity 41 of function (*Parser).parseVerbatim() is high (> 15) (gocyclo)
    • parse_import.go
    • Line 8: warning: cyclomatic complexity 25 of function (*Parser).parseImport() is high (> 15) (gocyclo)
    • twig.go
    • Line 226: warning: cyclomatic complexity 17 of function (*Engine).Load() is high (> 15) (gocyclo)
    • node.go
    • Line 395: warning: cyclomatic complexity 37 of function (*ForNode).renderForLoop() is high (> 15) (gocyclo)
    • Line 283: warning: cyclomatic complexity 25 of function (*ForNode).Render() is high (> 15) (gocyclo)
    • Line 784: warning: cyclomatic complexity 23 of function (*IncludeNode).Render() is high (> 15) (gocyclo)
    • parse_for.go
    • Line 12: warning: cyclomatic complexity 32 of function (*Parser).parseFor() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


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!