Preparing report...

Report for github.com/networkteam/go-sqllogger

A+    Excellent!    Found 2 issues across 9 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!


gocyclo88%

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.

    • go-sqllogger/fakedb_test.go
    • Line 821: warning: cyclomatic complexity 29 of function (*fakeStmt).QueryContext() is high (> 15) (gocyclo)
    • Line 585: warning: cyclomatic complexity 24 of function (*fakeConn).PrepareContext() is high (> 15) (gocyclo)
    • Line 707: warning: cyclomatic complexity 16 of function (*fakeStmt).ExecContext() is high (> 15) (gocyclo)

golint88%

Golint is a linter for Go source code.

    • go-sqllogger/logrusadapter/logrus.go
    • Line 10: warning: exported function NewSQLLogger should have comment or be unexported (golint)
    • Line 26: warning: exported type SQLLogger should have comment or be unexported (golint)
    • Line 34: warning: exported type Opts should have comment or be unexported (golint)
    • Line 43: warning: exported function DefaultOpts should have comment or be unexported (golint)
    • Line 54: warning: exported method SQLLogger.Connect should have comment or be unexported (golint)
    • Line 60: warning: exported method SQLLogger.ConnBegin should have comment or be unexported (golint)
    • Line 66: warning: exported method SQLLogger.ConnPrepare should have comment or be unexported (golint)
    • Line 74: warning: exported method SQLLogger.ConnPrepareContext should have comment or be unexported (golint)
    • Line 82: warning: exported method SQLLogger.ConnQuery should have comment or be unexported (golint)
    • Line 91: warning: exported method SQLLogger.ConnQueryContext should have comment or be unexported (golint)
    • Line 100: warning: exported method SQLLogger.ConnExec should have comment or be unexported (golint)
    • Line 107: warning: exported method SQLLogger.ConnExecContext should have comment or be unexported (golint)
    • Line 115: warning: exported method SQLLogger.ConnClose should have comment or be unexported (golint)
    • Line 121: warning: exported method SQLLogger.StmtExec should have comment or be unexported (golint)
    • Line 129: warning: exported method SQLLogger.StmtExecContext should have comment or be unexported (golint)
    • Line 137: warning: exported method SQLLogger.StmtQuery should have comment or be unexported (golint)
    • Line 146: warning: exported method SQLLogger.StmtQueryContext should have comment or be unexported (golint)
    • Line 155: warning: exported method SQLLogger.StmtClose should have comment or be unexported (golint)
    • Line 161: warning: exported method SQLLogger.RowsClose should have comment or be unexported (golint)
    • Line 167: warning: exported method SQLLogger.TxCommit should have comment or be unexported (golint)
    • Line 173: warning: exported method SQLLogger.TxRollback should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!