Preparing report...

Report for github.com/yunionio/sqlchemy

A+    Excellent!    Found 14 issues across 35 files

Tweet

gofmt100%

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

No problems detected. Good job!


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.

    • sqlchemy/insert.go
    • Line 40: warning: cyclomatic complexity 33 of function (*STableSpec).insertSqlPrep() is high (> 15) (gocyclo)
    • Line 172: warning: cyclomatic complexity 17 of function (*STableSpec).insert() is high (> 15) (gocyclo)
    • sqlchemy/inc.go
    • Line 43: warning: cyclomatic complexity 33 of function (*STableSpec).incrementInternal() is high (> 15) (gocyclo)
    • sqlchemy/update.go
    • Line 99: warning: cyclomatic complexity 30 of function (*SUpdateSession).saveUpdate() is high (> 15) (gocyclo)
    • sqlchemy/sync.go
    • Line 290: warning: cyclomatic complexity 29 of function (*STableSpec).SyncSQL() is high (> 15) (gocyclo)
    • Line 52: warning: cyclomatic complexity 28 of function (*sSqlColumnInfo).toColumnSpec() is high (> 15) (gocyclo)

golint94%

Golint is a linter for Go source code.

    • sqlchemy/sqltest/main.go
    • Line 50: warning: exported method SCompondStruct.IsZero should have comment or be unexported (golint)
    • Line 54: warning: exported method SCompondStruct.Equals should have comment or be unexported (golint)
    • Line 74: warning: exported type TestTable should have comment or be unexported (golint)
    • Line 89: warning: exported type Ticket should have comment or be unexported (golint)
    • Line 95: warning: exported method TestTable.BeforeInsert should have comment or be unexported (golint)
    • Line 103: warning: exported method Ticket.BeforeInsert should have comment or be unexported (golint)
    • Line 107: warning: exported type AgentTable should have comment or be unexported (golint)
    • sqlchemy/functions.go
    • Line 251: warning: don't use underscores in Go names; func OR_Val should be ORVal (golint)
    • Line 257: warning: don't use underscores in Go names; func AND_Val should be ANDVal (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign82%

IneffAssign detects ineffectual assignments in Go code.

    • sqlchemy/sqltest/main.go
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 32: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: could not import github.com/go-sql-driver/mysql (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/golang-plus/uuid (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import yunion.io/x/jsonutils (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import yunion.io/x/log (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import yunion.io/x/pkg/gotypes (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import yunion.io/x/pkg/util/timeutils (invalid package name: "") (ineffassign)
    • Line 32: warning: could not import yunion.io/x/sqlchemy (invalid package name: "") (ineffassign)
    • sqlchemy/errors.go
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: could not import github.com/go-sql-driver/mysql (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import yunion.io/x/pkg/errors (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import github.com/go-sql-driver/mysql (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import yunion.io/x/pkg/errors (invalid package name: "") (ineffassign)
    • sqlchemy/reflect.go
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: could not import yunion.io/x/jsonutils (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import yunion.io/x/pkg/util/timeutils (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import yunion.io/x/jsonutils (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import yunion.io/x/pkg/util/timeutils (invalid package name: "") (ineffassign)
    • sqlchemy/debug.go
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: could not import yunion.io/x/log (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import yunion.io/x/log (invalid package name: "") (ineffassign)
    • sqlchemy/column.go
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 26: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: could not import yunion.io/x/pkg/gotypes (invalid package name: "") (ineffassign)
    • Line 26: warning: could not import yunion.io/x/pkg/tristate (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import yunion.io/x/pkg/util/regutils (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import yunion.io/x/pkg/utils (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import yunion.io/x/pkg/gotypes (invalid package name: "") (ineffassign)
    • Line 26: warning: could not import yunion.io/x/pkg/tristate (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import yunion.io/x/pkg/util/regutils (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import yunion.io/x/pkg/utils (invalid package name: "") (ineffassign)
    • sqlchemy/conditions.go
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: could not import yunion.io/x/pkg/util/reflectutils (invalid package name: "") (ineffassign)
    • Line 21: warning: could not import yunion.io/x/pkg/util/reflectutils (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!