Preparing report...

Report for github.com/qustavo/sqlhooks

A    Great!    Found 11 issues across 19 files

Tweet

gofmt78%

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!


gocyclo100%

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.

No problems detected. Good job!


golint63%

Golint is a linter for Go source code.

    • sqlhooks/sqlhooks.go
    • Line 83: warning: exported method Conn.PrepareContext should have comment or be unexported (golint)
    • Line 102: warning: exported method Conn.Prepare should have comment or be unexported (golint)
    • Line 103: warning: exported method Conn.Close should have comment or be unexported (golint)
    • Line 104: warning: exported method Conn.Begin should have comment or be unexported (golint)
    • Line 105: warning: exported method Conn.BeginTx should have comment or be unexported (golint)
    • Line 141: warning: exported method ExecerContext.ExecContext should have comment or be unexported (golint)
    • Line 163: warning: exported method ExecerContext.Exec should have comment or be unexported (golint)
    • Line 203: warning: exported method QueryerContext.QueryContext should have comment or be unexported (golint)
    • Line 233: warning: comment on exported type ExecerQueryerContextWithSessionResetter should be of the form "ExecerQueryerContextWithSessionResetter ..." (with optional leading article) (golint)
    • Line 242: warning: exported type SessionResetter should have comment or be unexported (golint)
    • Line 266: warning: exported method Stmt.ExecContext should have comment or be unexported (golint)
    • Line 300: warning: exported method Stmt.QueryContext should have comment or be unexported (golint)
    • Line 322: warning: exported method Stmt.Close should have comment or be unexported (golint)
    • Line 323: warning: exported method Stmt.NumInput should have comment or be unexported (golint)
    • Line 324: warning: exported method Stmt.Exec should have comment or be unexported (golint)
    • Line 325: warning: exported method Stmt.Query should have comment or be unexported (golint)
    • sqlhooks/hooks/loghooks/loghooks.go
    • Line 14: warning: exported type Hook should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 23: warning: exported method Hook.Before should have comment or be unexported (golint)
    • Line 24: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 27: warning: exported method Hook.After should have comment or be unexported (golint)
    • Line 32: warning: exported method Hook.OnError should have comment or be unexported (golint)
    • sqlhooks/hooks/othooks/othooks.go
    • Line 10: warning: exported type Hook should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 18: warning: exported method Hook.Before should have comment or be unexported (golint)
    • Line 33: warning: exported method Hook.After should have comment or be unexported (golint)
    • Line 42: warning: exported method Hook.OnError should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.

    • sqlhooks/sqlhooks.go
    • Line 156: warning: ineffectual assignment to ctx (ineffassign)
    • Line 218: warning: ineffectual assignment to ctx (ineffassign)
    • Line 281: warning: ineffectual assignment to ctx (ineffassign)
    • Line 315: warning: ineffectual assignment to ctx (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!