Preparing report...

Report for xorm.io/core

A+    Excellent!    Found 14 issues across 23 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!


golint39%

Golint is a linter for Go source code.

    • /xorm.io/core/stmt.go
    • Line 21: warning: exported method DB.PrepareContext should have comment or be unexported (golint)
    • Line 37: warning: exported method DB.Prepare should have comment or be unexported (golint)
    • Line 41: warning: exported method Stmt.ExecMapContext should have comment or be unexported (golint)
    • Line 54: warning: exported method Stmt.ExecMap should have comment or be unexported (golint)
    • Line 58: warning: exported method Stmt.ExecStructContext should have comment or be unexported (golint)
    • Line 71: warning: exported method Stmt.ExecStruct should have comment or be unexported (golint)
    • Line 75: warning: exported method Stmt.QueryContext should have comment or be unexported (golint)
    • Line 83: warning: exported method Stmt.Query should have comment or be unexported (golint)
    • Line 87: warning: exported method Stmt.QueryMapContext should have comment or be unexported (golint)
    • Line 101: warning: exported method Stmt.QueryMap should have comment or be unexported (golint)
    • Line 105: warning: exported method Stmt.QueryStructContext should have comment or be unexported (golint)
    • Line 119: warning: exported method Stmt.QueryStruct should have comment or be unexported (golint)
    • Line 123: warning: exported method Stmt.QueryRowContext should have comment or be unexported (golint)
    • Line 128: warning: exported method Stmt.QueryRow should have comment or be unexported (golint)
    • Line 132: warning: exported method Stmt.QueryRowMapContext should have comment or be unexported (golint)
    • Line 146: warning: exported method Stmt.QueryRowMap should have comment or be unexported (golint)
    • Line 150: warning: exported method Stmt.QueryRowStructContext should have comment or be unexported (golint)
    • Line 164: warning: exported method Stmt.QueryRowStruct should have comment or be unexported (golint)
    • /xorm.io/core/dialect.go
    • Line 13: warning: exported type DbType should have comment or be unexported (golint)
    • Line 15: warning: exported type Uri should have comment or be unexported (golint)
    • Line 30: warning: comment on exported type Dialect should be of the form "Dialect ..." (with optional leading article) (golint)
    • Line 84: warning: exported function OpenDialect should have comment or be unexported (golint)
    • Line 98: warning: exported method Base.DB should have comment or be unexported (golint)
    • Line 102: warning: exported method Base.SetLogger should have comment or be unexported (golint)
    • Line 106: warning: exported method Base.Init should have comment or be unexported (golint)
    • Line 112: warning: exported method Base.URI should have comment or be unexported (golint)
    • Line 116: warning: exported method Base.DBType should have comment or be unexported (golint)
    • Line 120: warning: exported method Base.FormatBytes should have comment or be unexported (golint)
    • Line 124: warning: exported method Base.DriverName should have comment or be unexported (golint)
    • Line 128: warning: exported method Base.ShowCreateNull should have comment or be unexported (golint)
    • Line 132: warning: exported method Base.DataSourceName should have comment or be unexported (golint)
    • Line 136: warning: exported method Base.AndStr should have comment or be unexported (golint)
    • Line 140: warning: exported method Base.OrStr should have comment or be unexported (golint)
    • Line 144: warning: exported method Base.EqStr should have comment or be unexported (golint)
    • Line 148: warning: exported method Base.RollBackStr should have comment or be unexported (golint)
    • Line 148: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 152: warning: exported method Base.SupportDropIfExists should have comment or be unexported (golint)
    • Line 152: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 156: warning: exported method Base.DropTableSql should have comment or be unexported (golint)
    • Line 156: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 161: warning: exported method Base.HasRecords should have comment or be unexported (golint)
    • Line 161: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 175: warning: exported method Base.IsColumnExist should have comment or be unexported (golint)
    • Line 175: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 212: warning: exported method Base.CreateIndexSql should have comment or be unexported (golint)
    • Line 212: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 225: warning: exported method Base.DropIndexSql should have comment or be unexported (golint)
    • Line 225: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 236: warning: exported method Base.ModifyColumnSql should have comment or be unexported (golint)
    • Line 236: warning: receiver name db should be consistent with previous receiver name b for Base (golint)
    • Line 240: warning: exported method Base.CreateTableSql should have comment or be unexported (golint)
    • Line 292: warning: exported method Base.ForUpdateSql should have comment or be unexported (golint)
    • Line 296: warning: exported method Base.LogSQL should have comment or be unexported (golint)
    • Line 306: warning: exported method Base.SetParams should have comment or be unexported (golint)
    • /xorm.io/core/filter.go
    • Line 21: warning: exported method QuoteFilter.Do should have comment or be unexported (golint)
    • Line 45: warning: exported type Quoter should have comment or be unexported (golint)
    • Line 49: warning: exported function NewQuoter should have comment or be unexported (golint)
    • Line 53: warning: exported method Quoter.Quote should have comment or be unexported (golint)
    • Line 57: warning: exported method IdFilter.Do should have comment or be unexported (golint)
    • Line 91: warning: exported method SeqFilter.Do should have comment or be unexported (golint)
    • /xorm.io/core/mapper.go
    • Line 18: warning: exported type CacheMapper should have comment or be unexported (golint)
    • Line 26: warning: exported function NewCacheMapper should have comment or be unexported (golint)
    • Line 32: warning: exported method CacheMapper.Obj2Table should have comment or be unexported (golint)
    • Line 47: warning: exported method CacheMapper.Table2Obj should have comment or be unexported (golint)
    • Line 67: warning: exported method SameMapper.Obj2Table should have comment or be unexported (golint)
    • Line 71: warning: exported method SameMapper.Table2Obj should have comment or be unexported (golint)
    • Line 95: warning: exported method SnakeMapper.Obj2Table should have comment or be unexported (golint)
    • Line 123: warning: exported method SnakeMapper.Table2Obj should have comment or be unexported (golint)
    • Line 164: warning: exported method GonicMapper.Obj2Table should have comment or be unexported (golint)
    • Line 168: warning: exported method GonicMapper.Table2Obj should have comment or be unexported (golint)
    • Line 230: warning: exported method PrefixMapper.Obj2Table should have comment or be unexported (golint)
    • Line 234: warning: exported method PrefixMapper.Table2Obj should have comment or be unexported (golint)
    • Line 238: warning: exported function NewPrefixMapper should have comment or be unexported (golint)
    • Line 248: warning: exported method SuffixMapper.Obj2Table should have comment or be unexported (golint)
    • Line 252: warning: exported method SuffixMapper.Table2Obj should have comment or be unexported (golint)
    • Line 256: warning: exported function NewSuffixMapper should have comment or be unexported (golint)
    • /xorm.io/core/pk.go
    • Line 12: warning: exported type PK should have comment or be unexported (golint)
    • Line 14: warning: exported function NewPK should have comment or be unexported (golint)
    • Line 19: warning: exported method PK.ToString should have comment or be unexported (golint)
    • Line 26: warning: exported method PK.FromString should have comment or be unexported (golint)
    • /xorm.io/core/scan.go
    • Line 13: warning: exported type NullTime should have comment or be unexported (golint)
    • Line 19: warning: exported method NullTime.Scan should have comment or be unexported (golint)
    • Line 61: warning: exported type EmptyScanner should have comment or be unexported (golint)
    • Line 64: warning: exported method EmptyScanner.Scan should have comment or be unexported (golint)
    • /xorm.io/core/table.go
    • Line 32: warning: exported method Table.Columns should have comment or be unexported (golint)
    • Line 36: warning: exported method Table.ColumnsSeq should have comment or be unexported (golint)
    • Line 40: warning: exported function NewEmptyTable should have comment or be unexported (golint)
    • Line 70: warning: exported method Table.GetColumn should have comment or be unexported (golint)
    • Line 81: warning: exported method Table.GetColumnIdx should have comment or be unexported (golint)
    • Line 100: warning: exported method Table.ColumnType should have comment or be unexported (golint)
    • Line 105: warning: exported method Table.AutoIncrColumn should have comment or be unexported (golint)
    • Line 109: warning: exported method Table.VersionColumn should have comment or be unexported (golint)
    • Line 113: warning: exported method Table.UpdatedColumn should have comment or be unexported (golint)
    • Line 117: warning: exported method Table.DeletedColumn should have comment or be unexported (golint)
    • /xorm.io/core/db.go
    • Line 22: warning: exported function MapToSlice should have comment or be unexported (golint)
    • Line 43: warning: exported function StructToSlice should have comment or be unexported (golint)
    • Line 150: warning: exported method DB.QueryStructContext should have comment or be unexported (golint)
    • Line 158: warning: exported method DB.QueryStruct should have comment or be unexported (golint)
    • Line 162: warning: exported method DB.QueryRowContext should have comment or be unexported (golint)
    • Line 170: warning: exported method DB.QueryRow should have comment or be unexported (golint)
    • Line 174: warning: exported method DB.QueryRowMapContext should have comment or be unexported (golint)
    • Line 182: warning: exported method DB.QueryRowMap should have comment or be unexported (golint)
    • Line 186: warning: exported method DB.QueryRowStructContext should have comment or be unexported (golint)
    • Line 194: warning: exported method DB.QueryRowStruct should have comment or be unexported (golint)
    • Line 213: warning: exported method DB.ExecMap should have comment or be unexported (golint)
    • Line 217: warning: exported method DB.ExecStructContext should have comment or be unexported (golint)
    • Line 225: warning: exported method DB.ExecStruct should have comment or be unexported (golint)
    • /xorm.io/core/driver.go
    • Line 7: warning: exported type Driver should have comment or be unexported (golint)
    • Line 15: warning: exported function RegisterDriver should have comment or be unexported (golint)
    • Line 25: warning: exported function QueryDriver should have comment or be unexported (golint)
    • Line 29: warning: exported function RegisteredDriverSize should have comment or be unexported (golint)
    • /xorm.io/core/index.go
    • Line 26: warning: exported method Index.XName should have comment or be unexported (golint)
    • Line 46: warning: exported method Index.Equal should have comment or be unexported (golint)
    • /xorm.io/core/rows.go
    • Line 14: warning: exported type Rows should have comment or be unexported (golint)
    • Line 19: warning: exported method Rows.ToMapString should have comment or be unexported (golint)
    • Line 37: warning: comment on exported method Rows.ScanStructByIndex should be of the form "ScanStructByIndex ..." (golint)
    • Line 97: warning: comment on exported method Rows.ScanStructByName should be of the form "ScanStructByName ..." (golint)
    • Line 123: warning: comment on exported method Rows.ScanSlice should be of the form "ScanSlice ..." (golint)
    • Line 158: warning: comment on exported method Rows.ScanMap should be of the form "ScanMap ..." (golint)
    • Line 190: warning: exported type Row should have comment or be unexported (golint)
    • Line 208: warning: exported method Row.Columns should have comment or be unexported (golint)
    • Line 215: warning: exported method Row.Scan should have comment or be unexported (golint)
    • Line 241: warning: exported method Row.ScanStructByName should have comment or be unexported (golint)
    • Line 261: warning: exported method Row.ScanStructByIndex should have comment or be unexported (golint)
    • Line 281: warning: comment on exported method Row.ScanSlice should be of the form "ScanSlice ..." (golint)
    • Line 303: warning: comment on exported method Row.ScanMap should be of the form "ScanMap ..." (golint)
    • Line 325: warning: exported method Row.ToMapString should have comment or be unexported (golint)
    • /xorm.io/core/tx.go
    • Line 12: warning: exported type Tx should have comment or be unexported (golint)
    • Line 17: warning: exported method DB.BeginTx should have comment or be unexported (golint)
    • Line 25: warning: exported method DB.Begin should have comment or be unexported (golint)
    • Line 33: warning: exported method Tx.PrepareContext should have comment or be unexported (golint)
    • Line 49: warning: exported method Tx.Prepare should have comment or be unexported (golint)
    • Line 53: warning: exported method Tx.StmtContext should have comment or be unexported (golint)
    • Line 58: warning: exported method Tx.Stmt should have comment or be unexported (golint)
    • Line 62: warning: exported method Tx.ExecMapContext should have comment or be unexported (golint)
    • Line 70: warning: exported method Tx.ExecMap should have comment or be unexported (golint)
    • Line 74: warning: exported method Tx.ExecStructContext should have comment or be unexported (golint)
    • Line 82: warning: exported method Tx.ExecStruct should have comment or be unexported (golint)
    • Line 86: warning: exported method Tx.QueryContext should have comment or be unexported (golint)
    • Line 94: warning: exported method Tx.Query should have comment or be unexported (golint)
    • Line 98: warning: exported method Tx.QueryMapContext should have comment or be unexported (golint)
    • Line 106: warning: exported method Tx.QueryMap should have comment or be unexported (golint)
    • Line 110: warning: exported method Tx.QueryStructContext should have comment or be unexported (golint)
    • Line 118: warning: exported method Tx.QueryStruct should have comment or be unexported (golint)
    • Line 122: warning: exported method Tx.QueryRowContext should have comment or be unexported (golint)
    • Line 127: warning: exported method Tx.QueryRow should have comment or be unexported (golint)
    • Line 131: warning: exported method Tx.QueryRowMapContext should have comment or be unexported (golint)
    • Line 139: warning: exported method Tx.QueryRowMap should have comment or be unexported (golint)
    • Line 143: warning: exported method Tx.QueryRowStructContext should have comment or be unexported (golint)
    • Line 151: warning: exported method Tx.QueryRowStruct should have comment or be unexported (golint)
    • /xorm.io/core/type.go
    • Line 15: warning: exported const POSTGRES should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: comment on exported type SQLType should be of the form "SQLType ..." (with optional leading article) (golint)
    • Line 30: warning: exported const UNKNOW_TYPE should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported method SQLType.IsType should have comment or be unexported (golint)
    • Line 44: warning: exported method SQLType.IsText should have comment or be unexported (golint)
    • Line 48: warning: exported method SQLType.IsBlob should have comment or be unexported (golint)
    • Line 52: warning: exported method SQLType.IsTime should have comment or be unexported (golint)
    • Line 56: warning: exported method SQLType.IsNumeric should have comment or be unexported (golint)
    • Line 60: warning: exported method SQLType.IsJson should have comment or be unexported (golint)
    • Line 65: warning: exported var Bit should have comment or be unexported (golint)
    • Line 189: warning: don't use underscores in Go names; var c_EMPTY_STRING should be cEMPTYSTRING (golint)
    • Line 190: warning: don't use underscores in Go names; var c_BOOL_DEFAULT should be cBOOLDEFAULT (golint)
    • Line 191: warning: don't use underscores in Go names; var c_BYTE_DEFAULT should be cBYTEDEFAULT (golint)
    • Line 192: warning: don't use underscores in Go names; var c_COMPLEX64_DEFAULT should be cCOMPLEX64DEFAULT (golint)
    • Line 193: warning: don't use underscores in Go names; var c_COMPLEX128_DEFAULT should be cCOMPLEX128DEFAULT (golint)
    • Line 194: warning: don't use underscores in Go names; var c_FLOAT32_DEFAULT should be cFLOAT32DEFAULT (golint)
    • Line 195: warning: don't use underscores in Go names; var c_FLOAT64_DEFAULT should be cFLOAT64DEFAULT (golint)
    • Line 196: warning: don't use underscores in Go names; var c_INT64_DEFAULT should be cINT64DEFAULT (golint)
    • Line 197: warning: don't use underscores in Go names; var c_UINT64_DEFAULT should be cUINT64DEFAULT (golint)
    • Line 198: warning: don't use underscores in Go names; var c_INT32_DEFAULT should be cINT32DEFAULT (golint)
    • Line 199: warning: don't use underscores in Go names; var c_UINT32_DEFAULT should be cUINT32DEFAULT (golint)
    • Line 200: warning: don't use underscores in Go names; var c_INT16_DEFAULT should be cINT16DEFAULT (golint)
    • Line 201: warning: don't use underscores in Go names; var c_UINT16_DEFAULT should be cUINT16DEFAULT (golint)
    • Line 202: warning: don't use underscores in Go names; var c_INT8_DEFAULT should be cINT8DEFAULT (golint)
    • Line 203: warning: don't use underscores in Go names; var c_UINT8_DEFAULT should be cUINT8DEFAULT (golint)
    • Line 204: warning: don't use underscores in Go names; var c_INT_DEFAULT should be cINTDEFAULT (golint)
    • Line 205: warning: don't use underscores in Go names; var c_UINT_DEFAULT should be cUINTDEFAULT (golint)
    • Line 206: warning: don't use underscores in Go names; var c_TIME_DEFAULT should be cTIMEDEFAULT (golint)
    • Line 210: warning: exported var IntType should have comment or be unexported (golint)
    • Line 237: warning: exported var PtrIntType should have comment or be unexported (golint)
    • Line 300: warning: comment on exported function SQLType2Type should be of the form "SQLType2Type ..." (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!


misspell95%

Misspell Finds commonly misspelled English words