Preparing report...

Report for github.com/loghole/dbhook

(v0.4.1)

A+    Excellent!    Found 17 issues across 25 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!


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!


golint32%

Golint is a linter for Go source code.

    • driver.go
    • Line 8: warning: exported type Driver should have comment or be unexported (golint)
    • Line 13: warning: exported method Driver.Open should have comment or be unexported (golint)
    • errors.go
    • Line 6: warning: exported var ErrNonExecer should have comment or be unexported (golint)
    • hooks.go
    • Line 9: warning: exported type HookBefore should have comment or be unexported (golint)
    • Line 13: warning: exported type HookAfter should have comment or be unexported (golint)
    • Line 17: warning: exported type HookError should have comment or be unexported (golint)
    • Line 21: warning: exported type Hook should have comment or be unexported (golint)
    • Line 27: warning: exported type HookInput should have comment or be unexported (golint)
    • Line 34: warning: exported type HookOption should have comment or be unexported (golint)
    • Line 36: warning: exported type Hooks should have comment or be unexported (golint)
    • Line 42: warning: exported function NewHooks should have comment or be unexported (golint)
    • Line 52: warning: exported function WithHook should have comment or be unexported (golint)
    • Line 62: warning: exported function WithHooksBefore should have comment or be unexported (golint)
    • Line 73: warning: exported function WithHooksAfter should have comment or be unexported (golint)
    • Line 84: warning: exported function WithHooksError should have comment or be unexported (golint)
    • Line 95: warning: exported method Hooks.Before should have comment or be unexported (golint)
    • Line 108: warning: exported method Hooks.After should have comment or be unexported (golint)
    • const.go
    • Line 5: warning: exported type CallerType should have comment or be unexported (golint)
    • Line 8: warning: exported const CallerStmt should have comment (or a comment on this block) or be unexported (golint)
    • session_resetter.go
    • Line 8: warning: exported type SessionResetter should have comment or be unexported (golint)
    • Line 12: warning: exported method SessionResetter.ResetSession should have comment or be unexported (golint)
    • stmt.go
    • Line 8: warning: exported type Stmt should have comment or be unexported (golint)
    • Line 14: warning: exported method Stmt.Close should have comment or be unexported (golint)
    • Line 18: warning: exported method Stmt.NumInput should have comment or be unexported (golint)
    • wrapper.go
    • Line 5: warning: exported function Wrap should have comment or be unexported (golint)
    • execer.go
    • Line 9: warning: exported type ExecerContext should have comment or be unexported (golint)
    • Line 13: warning: exported method ExecerContext.ExecContext should have comment or be unexported (golint)
    • connection.go
    • Line 8: warning: exported type Conn should have comment or be unexported (golint)
    • Line 14: warning: exported method Conn.Prepare should have comment or be unexported (golint)
    • Line 15: warning: exported method Conn.Close should have comment or be unexported (golint)
    • Line 21: warning: exported method Conn.PrepareContext should have comment or be unexported (golint)
    • Line 67: warning: exported method Conn.BeginTx should have comment or be unexported (golint)
    • Line 114: warning: exported method Conn.CheckNamedValue should have comment or be unexported (golint)
    • queryer.go
    • Line 9: warning: exported type QueryerContext should have comment or be unexported (golint)
    • Line 13: warning: exported method QueryerContext.QueryContext should have comment or be unexported (golint)
    • examples/log/main.go
    • Line 16: warning: exported type Hook should have comment or be unexported (golint)
    • Line 20: warning: exported method Hook.Before should have comment or be unexported (golint)
    • Line 23: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 26: warning: exported method Hook.After should have comment or be unexported (golint)
    • tx.go
    • Line 8: warning: exported type Tx should have comment or be unexported (golint)
    • Line 14: warning: exported method Tx.Commit should have comment or be unexported (golint)
    • Line 54: warning: exported method Tx.Rollback should have comment or be unexported (golint)
    • examples/simple/main.go
    • Line 21: warning: exported type Hook should have comment or be unexported (golint)
    • Line 23: warning: exported method Hook.Before should have comment or be unexported (golint)
    • Line 29: warning: exported method Hook.After should have comment or be unexported (golint)
    • Line 53: warning: exported type TestToken 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!