Preparing report...

Report for github.com/moomou/xsqlparser

(v0.0.0-20230423030918-a90452565fe4)

A+    Excellent!    Found 13 issues across 48 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!


gofmt81%

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


gocyclo85%

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.

    • parser.go
    • Line 2177: warning: cyclomatic complexity 40 of function (*Parser).parsePrefix() is high (> 15) (gocyclo)
    • Line 172: warning: cyclomatic complexity 33 of function (*Parser).ParseDataType() is high (> 15) (gocyclo)
    • Line 1966: warning: cyclomatic complexity 29 of function (*Parser).parseInfix() is high (> 15) (gocyclo)
    • Line 2938: warning: cyclomatic complexity 21 of function (*Parser).nextTokenWithParseComment() is high (> 15) (gocyclo)
    • Line 886: warning: cyclomatic complexity 20 of function (*Parser).parseColumnConstraints() is high (> 15) (gocyclo)
    • Line 718: warning: cyclomatic complexity 19 of function (*Parser).parseTableConstraints() is high (> 15) (gocyclo)
    • Line 1642: warning: cyclomatic complexity 16 of function (*Parser).parseTableReferenceRight() is high (> 15) (gocyclo)
    • parser_test.go
    • Line 14: warning: cyclomatic complexity 31 of function TestParser_ParseStatement() is high (> 15) (gocyclo)
    • sqlast/operator.go
    • Line 82: warning: cyclomatic complexity 17 of function (*Operator).WriteTo() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 17 of function (*Operator).ToSQLString() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • parser.go
    • Line 794: warning: ineffectual assignment to err (ineffassign)
    • Line 794: warning: ineffectual assignment to err (ineffassign)

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!