Preparing report...

Report for github.com/rickb777/sqlapi

A+    Excellent!    Found 41 issues across 79 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!


gocyclo93%

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.


golint48%

Golint is a linter for Go source code.

    • sqlapi/support/test/stubrows.go
    • Line 13: warning: comment on exported type StubRows should be of the form "StubRows ..." (with optional leading article) (golint)
    • Line 24: warning: exported method StubRows.Next should have comment or be unexported (golint)
    • Line 33: warning: exported method StubRow.Scan should have comment or be unexported (golint)
    • Line 40: warning: exported method StubRows.Scan should have comment or be unexported (golint)
    • Line 48: warning: exported method StubRows.Columns should have comment or be unexported (golint)
    • Line 52: warning: exported method StubRows.ColumnTypes should have comment or be unexported (golint)
    • Line 56: warning: exported method StubRows.Close should have comment or be unexported (golint)
    • Line 60: warning: exported method StubRows.Err should have comment or be unexported (golint)
    • sqlapi/driver/dialect_mysql.go
    • Line 23: warning: exported function Mysql should have comment or be unexported (golint)
    • Line 61: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 131: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 135: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 148: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 154: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 158: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 162: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 168: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • Line 172: warning: receiver name dialect should be consistent with previous receiver name d for mysql (golint)
    • sqlapi/support/functions_gen.go
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 150: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 210: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 270: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 330: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 390: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 450: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 510: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 570: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 630: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 690: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 750: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sqlapi/types/kind.go
    • Line 5: warning: exported type Kind should have comment or be unexported (golint)
    • Line 8: warning: exported const Invalid should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: comment on exported method Kind.IsFloat should be of the form "IsFloat ..." (golint)
    • Line 91: warning: comment on exported method Kind.IsSimpleType should be of the form "IsSimpleType ..." (golint)
    • sqlapi/types/tag.go
    • Line 16: warning: exported const TagKey should have comment or be unexported (golint)
    • Line 39: warning: exported method Tag.ParentReference should have comment or be unexported (golint)
    • Line 158: warning: receiver name t should be consistent with previous receiver name tag for Tag (golint)
    • Line 194: warning: exported type Tags should have comment or be unexported (golint)
    • Line 212: warning: exported function ReadTagsFile should have comment or be unexported (golint)
    • sqlapi/pgxapi/logadapter/logger.go
    • Line 11: warning: exported type Logger should have comment or be unexported (golint)
    • Line 16: warning: exported function NewLogger should have comment or be unexported (golint)
    • Line 20: warning: exported method Logger.Log should have comment or be unexported (golint)
    • sqlapi/pgxapi/support/test/stubrows.go
    • Line 12: warning: comment on exported type StubRows should be of the form "StubRows ..." (with optional leading article) (golint)
    • Line 23: warning: exported method StubRows.Next should have comment or be unexported (golint)
    • Line 32: warning: exported method StubRow.Scan should have comment or be unexported (golint)
    • Line 39: warning: exported method StubRows.Scan should have comment or be unexported (golint)
    • Line 47: warning: exported method StubRows.FieldDescriptions should have comment or be unexported (golint)
    • Line 51: warning: exported method StubRows.Values should have comment or be unexported (golint)
    • Line 55: warning: exported method StubRows.Close should have comment or be unexported (golint)
    • Line 57: warning: exported method StubRows.Err should have comment or be unexported (golint)
    • sqlapi/schema/identifier.go
    • Line 8: warning: exported type Identifiers should have comment or be unexported (golint)
    • Line 10: warning: exported method Identifiers.Quoted should have comment or be unexported (golint)
    • Line 19: warning: exported method Identifiers.MkString should have comment or be unexported (golint)
    • Line 23: warning: exported method Identifiers.MkString3 should have comment or be unexported (golint)
    • Line 29: warning: exported method Identifiers.MkString3W should have comment or be unexported (golint)
    • sqlapi/pgxapi/support/functions_gen.go
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 149: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 209: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 269: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 329: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 389: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 449: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 509: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 569: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 629: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 689: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 749: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sqlapi/toggle_logger.go
    • Line 20: warning: exported function NewStdLogger should have comment or be unexported (golint)
    • Line 24: warning: exported function NewLogger should have comment or be unexported (golint)
    • sqlapi/constraint/consequence.go
    • Line 9: warning: comment on exported const NoAction should be of the form "NoAction ..." (golint)
    • Line 11: warning: exported const Restrict should have comment (or a comment on this block) or be unexported (golint)
    • sqlapi/support/test/stubexecer.go
    • Line 26: warning: exported method StubExecer.Query should have comment or be unexported (golint)
    • Line 31: warning: exported method StubExecer.QueryRow should have comment or be unexported (golint)
    • Line 36: warning: exported method StubExecer.Exec should have comment or be unexported (golint)
    • Line 41: warning: exported method StubExecer.Insert should have comment or be unexported (golint)
    • Line 46: warning: exported method StubExecer.IsTx should have comment or be unexported (golint)
    • Line 50: warning: exported method StubExecer.Logger should have comment or be unexported (golint)
    • Line 54: warning: exported method StubExecer.Dialect should have comment or be unexported (golint)
    • Line 60: warning: exported method StubExecer.Transact should have comment or be unexported (golint)
    • Line 64: warning: exported method StubExecer.Ping should have comment or be unexported (golint)
    • Line 68: warning: exported method StubExecer.Stats should have comment or be unexported (golint)
    • Line 72: warning: exported method StubExecer.SingleConn should have comment or be unexported (golint)
    • Line 76: warning: exported method StubExecer.Close should have comment or be unexported (golint)
    • Line 80: warning: exported method StubExecer.With should have comment or be unexported (golint)
    • Line 85: warning: exported method StubExecer.UserItem should have comment or be unexported (golint)
    • Line 91: warning: exported method StubExecer.Commit should have comment or be unexported (golint)
    • Line 95: warning: exported method StubExecer.Rollback should have comment or be unexported (golint)
    • sqlapi/pgxapi/support/test/stubexecer.go
    • Line 27: warning: exported method StubExecer.Query should have comment or be unexported (golint)
    • Line 32: warning: exported method StubExecer.QueryRow should have comment or be unexported (golint)
    • Line 37: warning: exported method StubExecer.Exec should have comment or be unexported (golint)
    • Line 42: warning: exported method StubExecer.Insert should have comment or be unexported (golint)
    • Line 47: warning: exported method StubExecer.IsTx should have comment or be unexported (golint)
    • Line 51: warning: exported method StubExecer.Logger should have comment or be unexported (golint)
    • Line 60: warning: exported method StubExecer.Dialect should have comment or be unexported (golint)
    • Line 71: warning: exported method StubExecer.Transact should have comment or be unexported (golint)
    • Line 75: warning: exported method StubExecer.Ping should have comment or be unexported (golint)
    • Line 79: warning: exported method StubExecer.Stats should have comment or be unexported (golint)
    • Line 83: warning: exported method StubExecer.SingleConn should have comment or be unexported (golint)
    • Line 87: warning: exported method StubExecer.Close should have comment or be unexported (golint)
    • Line 91: warning: exported method StubExecer.With should have comment or be unexported (golint)
    • Line 96: warning: exported method StubExecer.UserItem should have comment or be unexported (golint)
    • Line 102: warning: exported method StubExecer.Commit should have comment or be unexported (golint)
    • Line 106: warning: exported method StubExecer.Rollback should have comment or be unexported (golint)
    • sqlapi/driver/dialect_postgres.go
    • Line 18: warning: exported function Postgres should have comment or be unexported (golint)
    • Line 57: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 117: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 121: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 129: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 138: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 142: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 146: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 167: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • Line 182: warning: receiver name dialect should be consistent with previous receiver name d for postgres (golint)
    • sqlapi/pgxapi/table.go
    • Line 115: warning: exported method CoreTable.Name should have comment or be unexported (golint)
    • Line 119: warning: exported method CoreTable.Execer should have comment or be unexported (golint)
    • Line 123: warning: exported method CoreTable.DB should have comment or be unexported (golint)
    • Line 127: warning: exported method CoreTable.Tx should have comment or be unexported (golint)
    • Line 131: warning: exported method CoreTable.IsTx should have comment or be unexported (golint)
    • Line 136: warning: exported method CoreTable.Dialect should have comment or be unexported (golint)
    • Line 140: warning: exported method CoreTable.Logger should have comment or be unexported (golint)
    • Line 144: warning: exported method CoreTable.Ctx should have comment or be unexported (golint)
    • sqlapi/table.go
    • Line 115: warning: exported method CoreTable.Name should have comment or be unexported (golint)
    • Line 119: warning: exported method CoreTable.Execer should have comment or be unexported (golint)
    • Line 123: warning: exported method CoreTable.DB should have comment or be unexported (golint)
    • Line 127: warning: exported method CoreTable.Tx should have comment or be unexported (golint)
    • Line 131: warning: exported method CoreTable.IsTx should have comment or be unexported (golint)
    • Line 136: warning: exported method CoreTable.Dialect should have comment or be unexported (golint)
    • Line 140: warning: exported method CoreTable.Logger should have comment or be unexported (golint)
    • Line 144: warning: exported method CoreTable.Ctx should have comment or be unexported (golint)
    • sqlapi/driver/dialect_sqlite.go
    • Line 16: warning: exported function Sqlite should have comment or be unexported (golint)
    • Line 55: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 124: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 128: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 133: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 139: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 143: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 147: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 153: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • Line 157: warning: receiver name dialect should be consistent with previous receiver name d for sqlite (golint)
    • sqlapi/schema/schema.go
    • Line 8: warning: should not use dot imports (golint)
    • Line 11: warning: exported type SqlEncode should have comment or be unexported (golint)
    • Line 14: warning: exported const ENCNONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type TableDescription should have comment or be unexported (golint)
    • Line 29: warning: exported type Node should have comment or be unexported (golint)
    • Line 35: warning: exported type Field should have comment or be unexported (golint)
    • Line 42: warning: exported type Index should have comment or be unexported (golint)
    • Line 48: warning: exported method TableDescription.HasIntegerPrimaryKey should have comment or be unexported (golint)
    • Line 52: warning: exported method TableDescription.HasPrimaryKey should have comment or be unexported (golint)
    • Line 56: warning: exported method TableDescription.SafePrimary should have comment or be unexported (golint)
    • Line 63: warning: exported method TableDescription.NumColumnNames should have comment or be unexported (golint)
    • Line 73: warning: exported method TableDescription.ColumnNames should have comment or be unexported (golint)
    • Line 73: warning: receiver name table should be consistent with previous receiver name t for TableDescription (golint)
    • Line 80: warning: exported method TableDescription.SimpleFields should have comment or be unexported (golint)
    • Line 98: warning: exported method Field.IsExported should have comment or be unexported (golint)
    • Line 103: warning: exported method Field.GetTags should have comment or be unexported (golint)
    • Line 110: warning: exported method Field.Skip should have comment or be unexported (golint)
    • Line 114: warning: exported method Field.PrimaryKey should have comment or be unexported (golint)
    • Line 118: warning: exported method Field.NaturalKey should have comment or be unexported (golint)
    • Line 122: warning: exported method Field.AutoIncrement should have comment or be unexported (golint)
    • Line 128: warning: exported method Index.UniqueStr should have comment or be unexported (golint)
    • Line 135: warning: exported method Index.JoinedNames should have comment or be unexported (golint)
    • Line 139: warning: exported method Index.Columns should have comment or be unexported (golint)
    • Line 143: warning: exported method Index.Single should have comment or be unexported (golint)
    • Line 165: warning: exported method Node.JoinParts should have comment or be unexported (golint)
    • Line 175: warning: exported type FieldList should have comment or be unexported (golint)
    • Line 177: warning: exported method FieldList.NonEmpty should have comment or be unexported (golint)
    • Line 181: warning: exported method FieldList.IsEmpty should have comment or be unexported (golint)
    • Line 185: warning: exported method FieldList.DistinctTypes should have comment or be unexported (golint)
    • Line 202: warning: exported method FieldList.FormalParams should have comment or be unexported (golint)
    • Line 210: warning: exported method FieldList.WhereClauses should have comment or be unexported (golint)
    • Line 218: warning: exported method FieldList.Names should have comment or be unexported (golint)
    • Line 226: warning: exported method FieldList.SqlNames should have comment or be unexported (golint)
    • Line 234: warning: exported method FieldList.Filter should have comment or be unexported (golint)
    • Line 251: warning: comment on exported method FieldList.NoPointers should be of the form "NoPointers ..." (golint)
    • Line 272: warning: comment on exported method FieldList.NoAuto should be of the form "NoAuto ..." (golint)
    • sqlapi/schema/type.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 9: warning: exported type Type should have comment or be unexported (golint)
    • Line 19: warning: exported method Type.Tag should have comment or be unexported (golint)
    • Line 26: warning: exported method Type.Star should have comment or be unexported (golint)
    • Line 33: warning: exported method Type.Type should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 41: warning: exported method Type.NullableValue should have comment or be unexported (golint)
    • Line 58: warning: exported method Type.IsBasicType should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words