Preparing report...

Report for github.com/jptosso/coraza-waf

(v1.2.0)

A+    Excellent!    Found 28 issues across 153 files

Tweet

gofmt96%

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!


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.

    • testing/engine.go
    • Line 28: warning: cyclomatic complexity 25 of function (*ProfileTestStage).Start() is high (> 15) (gocyclo)
    • variables.go
    • Line 127: warning: cyclomatic complexity 88 of function NameToVariable() is high (> 15) (gocyclo)
    • Line 310: warning: cyclomatic complexity 88 of function VariableToName() is high (> 15) (gocyclo)
    • rule.go
    • Line 174: warning: cyclomatic complexity 26 of function (*Rule).Evaluate() is high (> 15) (gocyclo)
    • seclang/rule_parser.go
    • Line 47: warning: cyclomatic complexity 35 of function (*RuleParser).ParseVariables() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 21 of function ParseActions() is high (> 15) (gocyclo)
    • transaction.go
    • Line 706: warning: cyclomatic complexity 22 of function (*Transaction).ProcessRequestBody() is high (> 15) (gocyclo)
    • Line 937: warning: cyclomatic complexity 16 of function (*Transaction).AuditLog() is high (> 15) (gocyclo)
    • actions/ctl.go
    • Line 60: warning: cyclomatic complexity 37 of function (*Ctl).Evaluate() is high (> 15) (gocyclo)
    • Line 175: warning: cyclomatic complexity 20 of function parseCtl() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words

    • rule.go
    • Line 301: warning: "runing" is a misspelling of "running" (misspell)
    • collection.go
    • Line 104: warning: "ocurrence" is a misspelling of "occurrence" (misspell)
    • Line 114: warning: "ocurrence" is a misspelling of "occurrence" (misspell)
    • Line 125: warning: "ocurrence" is a misspelling of "occurrence" (misspell)