Preparing report...

Report for github.com/deatheyes/sqlparser

A+    Excellent!    Found 10 issues across 36 files

Tweet

gofmt97%

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!


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.

    • sqlparser/yaccpar
    • Line 156: warning: cyclomatic complexity 614 of function (*yyParserImpl).Parse() is high (> 15) (gocyclo)
    • Line 53: warning: cyclomatic complexity 20 of function yyErrorMessage() is high (> 15) (gocyclo)
    • sqlparser/ast.go
    • Line 1060: warning: cyclomatic complexity 44 of function (*ColumnType).SQLType() is high (> 15) (gocyclo)
    • Line 972: warning: cyclomatic complexity 20 of function (*ColumnType).Format() is high (> 15) (gocyclo)
    • sqlparser/analyzer.go
    • Line 286: warning: cyclomatic complexity 21 of function ExtractSetValues() is high (> 15) (gocyclo)
    • Line 55: warning: cyclomatic complexity 19 of function Preview() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 18 of function StmtType() is high (> 15) (gocyclo)

golint97%

Golint is a linter for Go source code.

    • sqlparser/ast.go
    • Line 2899: warning: exported method RowNumberOverExpr.Format should have comment or be unexported (golint)
    • Line 3139: warning: exported method PartitionBy.Format should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign86%

IneffAssign detects ineffectual assignments in Go code.

    • sqlparser/dependency/sqltypes/value.go
    • Line 26: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 26: warning: could not import github.com/deatheyes/sqlparser/dependency/bytes2 (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import github.com/deatheyes/sqlparser/dependency/hack (invalid package name: "") (ineffassign)
    • Line 26: warning: could not import github.com/deatheyes/sqlparser/dependency/bytes2 (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import github.com/deatheyes/sqlparser/dependency/hack (invalid package name: "") (ineffassign)
    • sqlparser/dependency/sqltypes/bind_variables.go
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: could not import github.com/deatheyes/sqlparser/dependency/querypb (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/deatheyes/sqlparser/dependency/querypb (invalid package name: "") (ineffassign)
    • sqlparser/token.go
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: could not import github.com/deatheyes/sqlparser/dependency/bytes2 (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/deatheyes/sqlparser/dependency/bytes2 (invalid package name: "") (ineffassign)
    • sqlparser/ast.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/deatheyes/sqlparser/dependency/querypb (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import github.com/deatheyes/sqlparser/dependency/querypb (invalid package name: "") (ineffassign)
    • sqlparser/analyzer.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/deatheyes/sqlparser/dependency/sqltypes (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import github.com/deatheyes/sqlparser/dependency/sqltypes (invalid package name: "") (ineffassign)

misspell94%

Misspell Finds commonly misspelled English words