Preparing report...

Report for github.com/xqbumu/sqlparser

(v0.0.0-20220608101129-1fd7622f50ee)

A+    Excellent!    Found 24 issues across 89 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!


gofmt91%

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


gocyclo79%

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.

    • dependency/sqltypes/type.go
    • Line 270: warning: cyclomatic complexity 21 of function AreTypesEquivalent() is high (> 15) (gocyclo)
    • Line 212: warning: cyclomatic complexity 21 of function modifyType() is high (> 15) (gocyclo)
    • ast_visit.go
    • Line 20: warning: cyclomatic complexity 221 of function VisitSQLNode() is high (> 15) (gocyclo)
    • Line 3862: warning: cyclomatic complexity 73 of function VisitExpr() is high (> 15) (gocyclo)
    • Line 4030: warning: cyclomatic complexity 73 of function VisitJSONPathParam() is high (> 15) (gocyclo)
    • Line 4242: warning: cyclomatic complexity 47 of function VisitStatement() is high (> 15) (gocyclo)
    • Line 3662: warning: cyclomatic complexity 47 of function VisitCallable() is high (> 15) (gocyclo)
    • Line 3610: warning: cyclomatic complexity 23 of function VisitAlterOption() is high (> 15) (gocyclo)
    • Line 2779: warning: cyclomatic complexity 16 of function VisitRefOfSelect() is high (> 15) (gocyclo)
    • ast_funcs.go
    • Line 209: warning: cyclomatic complexity 44 of function (*ColumnType).SQLType() is high (> 15) (gocyclo)
    • Line 1638: warning: cyclomatic complexity 40 of function (ShowCommandType).ToString() is high (> 15) (gocyclo)
    • Line 1546: warning: cyclomatic complexity 21 of function (IntervalTypes).ToString() is high (> 15) (gocyclo)
    • token.go
    • Line 113: warning: cyclomatic complexity 60 of function (*Tokenizer).Scan() is high (> 15) (gocyclo)
    • Line 461: warning: cyclomatic complexity 16 of function (*Tokenizer).scanNumber() is high (> 15) (gocyclo)
    • ast_format.go
    • Line 321: warning: cyclomatic complexity 39 of function (*PartitionSpec).Format() is high (> 15) (gocyclo)
    • Line 663: warning: cyclomatic complexity 39 of function (*ColumnType).Format() is high (> 15) (gocyclo)
    • ast_rewrite.go
    • Line 20: warning: cyclomatic complexity 221 of function (*application).rewriteSQLNode() is high (> 15) (gocyclo)
    • Line 7818: warning: cyclomatic complexity 73 of function (*application).rewriteJSONPathParam() is high (> 15) (gocyclo)
    • Line 7650: warning: cyclomatic complexity 73 of function (*application).rewriteExpr() is high (> 15) (gocyclo)
    • Line 7450: warning: cyclomatic complexity 47 of function (*application).rewriteCallable() is high (> 15) (gocyclo)
    • Line 8030: warning: cyclomatic complexity 47 of function (*application).rewriteStatement() is high (> 15) (gocyclo)
    • Line 7398: warning: cyclomatic complexity 23 of function (*application).rewriteAlterOption() is high (> 15) (gocyclo)
    • Line 5527: warning: cyclomatic complexity 18 of function (*application).rewriteRefOfSelect() is high (> 15) (gocyclo)
    • ast_clone.go
    • Line 21: warning: cyclomatic complexity 221 of function CloneSQLNode() is high (> 15) (gocyclo)
    • Line 3056: warning: cyclomatic complexity 73 of function CloneExpr() is high (> 15) (gocyclo)
    • Line 3228: warning: cyclomatic complexity 73 of function CloneJSONPathParam() is high (> 15) (gocyclo)
    • Line 3450: warning: cyclomatic complexity 47 of function CloneStatement() is high (> 15) (gocyclo)
    • Line 2842: warning: cyclomatic complexity 47 of function CloneCallable() is high (> 15) (gocyclo)
    • Line 2788: warning: cyclomatic complexity 23 of function CloneAlterOption() is high (> 15) (gocyclo)
    • analyzer.go
    • Line 167: warning: cyclomatic complexity 27 of function Preview() is high (> 15) (gocyclo)
    • Line 245: warning: cyclomatic complexity 26 of function (StatementType).String() is high (> 15) (gocyclo)
    • Line 64: warning: cyclomatic complexity 25 of function ASTToStatementType() is high (> 15) (gocyclo)
    • precedence.go
    • Line 48: warning: cyclomatic complexity 21 of function precedenceFor() is high (> 15) (gocyclo)
    • comments_test.go
    • Line 262: warning: cyclomatic complexity 19 of function TestExtractCommentDirectives() is high (> 15) (gocyclo)
    • goyacc/goyacc.go
    • Line 378: warning: cyclomatic complexity 76 of function setup() is high (> 15) (gocyclo)
    • Line 848: warning: cyclomatic complexity 58 of function gettok() is high (> 15) (gocyclo)
    • Line 1435: warning: cyclomatic complexity 49 of function cpyact() is high (> 15) (gocyclo)
    • Line 2993: warning: cyclomatic complexity 29 of function others() is high (> 15) (gocyclo)
    • Line 1965: warning: cyclomatic complexity 26 of function closure() is high (> 15) (gocyclo)
    • Line 2315: warning: cyclomatic complexity 22 of function output() is high (> 15) (gocyclo)
    • Line 2745: warning: cyclomatic complexity 21 of function callopt() is high (> 15) (gocyclo)
    • Line 2442: warning: cyclomatic complexity 20 of function wract() is high (> 15) (gocyclo)
    • Line 2248: warning: cyclomatic complexity 20 of function apack() is high (> 15) (gocyclo)
    • Line 2097: warning: cyclomatic complexity 19 of function state() is high (> 15) (gocyclo)
    • Line 1720: warning: cyclomatic complexity 18 of function cempty() is high (> 15) (gocyclo)
    • Line 1233: warning: cyclomatic complexity 17 of function isPackageClause() is high (> 15) (gocyclo)
    • Line 1118: warning: cyclomatic complexity 17 of function parsetypes() is high (> 15) (gocyclo)
    • Line 2909: warning: cyclomatic complexity 17 of function stin() is high (> 15) (gocyclo)
    • Line 2532: warning: cyclomatic complexity 16 of function wrstate() is high (> 15) (gocyclo)
    • Line 1873: warning: cyclomatic complexity 16 of function stagen() is high (> 15) (gocyclo)
    • Line 1360: warning: cyclomatic complexity 16 of function cpyyvalaccess() is high (> 15) (gocyclo)
    • ast_rewriting.go
    • Line 311: warning: cyclomatic complexity 37 of function (*astRewriter).rewrite() is high (> 15) (gocyclo)
    • Line 720: warning: cyclomatic complexity 21 of function rewriteToCNFExpr() is high (> 15) (gocyclo)
    • Line 510: warning: cyclomatic complexity 20 of function (*astRewriter).unnestSubQueries() is high (> 15) (gocyclo)
    • tracked_buffer.go
    • Line 126: warning: cyclomatic complexity 20 of function (*TrackedBuffer).astPrintf() is high (> 15) (gocyclo)
    • ast_equals.go
    • Line 21: warning: cyclomatic complexity 443 of function EqualsSQLNode() is high (> 15) (gocyclo)
    • Line 5148: warning: cyclomatic complexity 147 of function EqualsJSONPathParam() is high (> 15) (gocyclo)
    • Line 4674: warning: cyclomatic complexity 147 of function EqualsExpr() is high (> 15) (gocyclo)
    • Line 4179: warning: cyclomatic complexity 95 of function EqualsCallable() is high (> 15) (gocyclo)
    • Line 5709: warning: cyclomatic complexity 95 of function EqualsStatement() is high (> 15) (gocyclo)
    • Line 4038: warning: cyclomatic complexity 47 of function EqualsAlterOption() is high (> 15) (gocyclo)
    • Line 4584: warning: cyclomatic complexity 21 of function EqualsDDLStatement() is high (> 15) (gocyclo)
    • Line 3336: warning: cyclomatic complexity 19 of function EqualsRefOfSelect() is high (> 15) (gocyclo)
    • Line 6134: warning: cyclomatic complexity 18 of function EqualsRefOfColumnTypeOptions() 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!


misspell97%

Misspell Finds commonly misspelled English words

    • precedence.go
    • Line 19: warning: "Precendence" is a misspelling of "Precedence" (misspell)
    • Line 21: warning: "Precendence" is a misspelling of "Precedence" (misspell)
    • Line 24: warning: "Precendence" is a misspelling of "Precedence" (misspell)
    • Line 48: warning: "Precendence" is a misspelling of "Precedence" (misspell)