Preparing report...

Report for github.com/blusewang/pg

A    Great!    Found 16 issues across 21 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!


gocyclo76%

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.


golint28%

Golint is a linter for Go source code.

    • pg/internal/network/enums.go
    • Line 9: warning: exported type TransactionStatus should have comment or be unexported (golint)
    • Line 12: warning: exported const TransactionStatusIdle should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Identifies should have comment or be unexported (golint)
    • Line 20: warning: exported const IdentifiesAuth should have comment (or a comment on this block) or be unexported (golint)
    • pg/internal/driver/pg_stmt.go
    • Line 15: warning: exported function NewPgStmt should have comment or be unexported (golint)
    • Line 33: warning: exported type PgStmt should have comment or be unexported (golint)
    • Line 42: warning: exported method PgStmt.Close should have comment or be unexported (golint)
    • Line 57: warning: exported method PgStmt.NumInput should have comment or be unexported (golint)
    • Line 61: warning: exported method PgStmt.Exec should have comment or be unexported (golint)
    • Line 73: warning: exported method PgStmt.Query should have comment or be unexported (golint)
    • pg/internal/driver/pg_rows.go
    • Line 22: warning: exported type PgRows should have comment or be unexported (golint)
    • Line 32: warning: exported method PgRows.Columns should have comment or be unexported (golint)
    • Line 39: warning: exported method PgRows.Close should have comment or be unexported (golint)
    • Line 48: warning: exported method PgRows.Next should have comment or be unexported (golint)
    • Line 64: warning: comment on exported method PgRows.ColumnTypePrecisionScale should be of the form "ColumnTypePrecisionScale ..." (golint)
    • Line 79: warning: exported method PgRows.ColumnTypeLength should have comment or be unexported (golint)
    • Line 90: warning: exported method PgRows.ColumnTypeDatabaseTypeName should have comment or be unexported (golint)
    • Line 94: warning: exported method PgRows.ColumnTypeScanType should have comment or be unexported (golint)
    • Line 127: warning: comment on exported method PgRows.HasNextResultSet should be of the form "HasNextResultSet ..." (golint)
    • pg/main.go
    • Line 19: warning: exported function NewConnector should have comment or be unexported (golint)
    • pg/internal/driver/pg_conn.go
    • Line 24: warning: exported function NewPgConn should have comment or be unexported (golint)
    • Line 44: warning: exported function NewPgConnContext should have comment or be unexported (golint)
    • Line 65: warning: exported type PgConn should have comment or be unexported (golint)
    • Line 113: warning: exported method PgConn.Query should have comment or be unexported (golint)
    • Line 130: warning: comment on exported method PgConn.CheckNamedValue should be of the form "CheckNamedValue ..." (golint)
    • Line 141: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pg/internal/network/pg_message.go
    • Line 15: warning: exported function NewPgMessage should have comment or be unexported (golint)
    • Line 23: warning: exported type PgMessage should have comment or be unexported (golint)
    • Line 84: warning: exported method PgMessage.ParseError should have comment or be unexported (golint)
    • pg/internal/driver/pg_connector.go
    • Line 14: warning: exported type PgConnector should have comment or be unexported (golint)
    • Line 18: warning: exported method PgConnector.Connect should have comment or be unexported (golint)
    • Line 22: warning: exported method PgConnector.Driver should have comment or be unexported (golint)
    • pg/internal/driver/pg_driver.go
    • Line 14: warning: exported type PgDriver should have comment or be unexported (golint)
    • Line 16: warning: exported method PgDriver.Open should have comment or be unexported (golint)
    • Line 36: warning: exported method PgDriver.OpenConnector should have comment or be unexported (golint)
    • pg/internal/driver/pg_tx.go
    • Line 14: warning: exported type PgTx should have comment or be unexported (golint)
    • Line 18: warning: exported method PgTx.Commit should have comment or be unexported (golint)
    • Line 35: warning: exported method PgTx.Rollback should have comment or be unexported (golint)
    • pg/internal/network/pg_io.go
    • Line 25: warning: exported function NewPgIO should have comment or be unexported (golint)
    • Line 33: warning: exported type PgIO should have comment or be unexported (golint)
    • Line 46: warning: exported method PgIO.Md5 should have comment or be unexported (golint)
    • Line 112: warning: exported method PgIO.Dial should have comment or be unexported (golint)
    • Line 120: warning: exported method PgIO.DialContext should have comment or be unexported (golint)
    • Line 129: warning: exported method PgIO.StartUp should have comment or be unexported (golint)
    • Line 235: warning: exported method PgIO.QueryNoArgs should have comment or be unexported (golint)
    • Line 279: warning: exported method PgIO.Parse should have comment or be unexported (golint)
    • Line 317: warning: exported method PgIO.ParseExec should have comment or be unexported (golint)
    • Line 360: warning: comment on exported method PgIO.ParseQuery should be of the form "ParseQuery ..." (golint)
    • Line 418: warning: exported method PgIO.CloseParse should have comment or be unexported (golint)
    • Line 441: warning: exported method PgIO.CancelRequest should have comment or be unexported (golint)
    • Line 461: warning: exported method PgIO.Terminate should have comment or be unexported (golint)
    • Line 471: warning: exported method PgIO.IsInTransaction should have comment or be unexported (golint)
    • pg/internal/helper/dsn.go
    • Line 21: warning: exported type DataSourceName should have comment or be unexported (golint)
    • Line 38: warning: exported function ParseDSN should have comment or be unexported (golint)
    • Line 256: warning: exported method DataSourceName.Address should have comment or be unexported (golint)
    • pg/internal/driver/enums.go
    • Line 9: warning: exported type PgType should have comment or be unexported (golint)
    • Line 12: warning: exported const PgTypeBool should have comment (or a comment on this block) or be unexported (golint)
    • Line 186: warning: exported var PgTypeMap should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!