Preparing report...

Report for xorm.io/xorm

(v1.3.4)

A+    Excellent!    Found 37 issues across 159 files

Tweet

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!


gofmt99%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo77%

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.

    • tests/tests.go
    • Line 47: warning: cyclomatic complexity 32 of function createEngine() is high (> 15) (gocyclo)
    • tags/tag.go
    • Line 22: warning: cyclomatic complexity 22 of function splitTag() is high (> 15) (gocyclo)
    • session_update.go
    • Line 63: warning: cyclomatic complexity 48 of function (*Session).Update() is high (> 15) (gocyclo)
    • Line 243: warning: cyclomatic complexity 27 of function (*Session).genUpdateColumns() is high (> 15) (gocyclo)
    • convert/int.go
    • Line 16: warning: cyclomatic complexity 40 of function AsInt64() is high (> 15) (gocyclo)
    • Line 115: warning: cyclomatic complexity 20 of function AsUint64() is high (> 15) (gocyclo)
    • dialects/mssql.go
    • Line 301: warning: cyclomatic complexity 31 of function (*mssql).SQLType() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 17 of function (*mssql).GetColumns() is high (> 15) (gocyclo)
    • dialects/filter.go
    • Line 25: warning: cyclomatic complexity 28 of function postgresSeqFilterConvertQuestionMark() is high (> 15) (gocyclo)
    • Line 91: warning: cyclomatic complexity 21 of function oracleSeqFilterConvertQuestionMark() is high (> 15) (gocyclo)
    • tags/parser.go
    • Line 190: warning: cyclomatic complexity 23 of function (*Parser).parseFieldWithTags() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 16 of function (*Parser).Parse() is high (> 15) (gocyclo)
    • engine.go
    • Line 461: warning: cyclomatic complexity 114 of function (*Engine).dumpTables() is high (> 15) (gocyclo)
    • session.go
    • Line 537: warning: cyclomatic complexity 46 of function (*Session).convertBeanField() is high (> 15) (gocyclo)
    • Line 497: warning: cyclomatic complexity 16 of function asKind() is high (> 15) (gocyclo)
    • dialects/postgres.go
    • Line 1095: warning: cyclomatic complexity 35 of function (*postgres).GetColumns() is high (> 15) (gocyclo)
    • Line 1416: warning: cyclomatic complexity 25 of function parseOpts() is high (> 15) (gocyclo)
    • Line 906: warning: cyclomatic complexity 22 of function (*postgres).SQLType() is high (> 15) (gocyclo)
    • Line 1291: warning: cyclomatic complexity 17 of function (*postgres).GetIndexes() is high (> 15) (gocyclo)
    • convert/time.go
    • Line 19: warning: cyclomatic complexity 31 of function String2Time() is high (> 15) (gocyclo)
    • Line 93: warning: cyclomatic complexity 22 of function AsTime() is high (> 15) (gocyclo)
    • internal/statements/update.go
    • Line 67: warning: cyclomatic complexity 80 of function (*Statement).BuildUpdates() is high (> 15) (gocyclo)
    • Line 353: warning: cyclomatic complexity 24 of function (*Statement).writeUpdateLimit() is high (> 15) (gocyclo)
    • Line 22: warning: cyclomatic complexity 18 of function (*Statement).ifAddColUpdate() is high (> 15) (gocyclo)
    • Line 581: warning: cyclomatic complexity 16 of function (*Statement).WriteUpdate() is high (> 15) (gocyclo)
    • convert/conversion.go
    • Line 58: warning: cyclomatic complexity 93 of function Assign() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 19 of function AssignValue() is high (> 15) (gocyclo)
    • sync.go
    • Line 62: warning: cyclomatic complexity 68 of function (*Session).SyncWithOptions() is high (> 15) (gocyclo)
    • session_find.go
    • Line 335: warning: cyclomatic complexity 44 of function (*Session).cacheFind() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 27 of function (*Session).find() is high (> 15) (gocyclo)
    • Line 224: warning: cyclomatic complexity 22 of function (*Session).noCacheFind() is high (> 15) (gocyclo)
    • dialects/dameng.go
    • Line 853: warning: cyclomatic complexity 32 of function (*dameng).GetColumns() is high (> 15) (gocyclo)
    • Line 569: warning: cyclomatic complexity 23 of function (*dameng).SQLType() is high (> 15) (gocyclo)
    • Line 666: warning: cyclomatic complexity 22 of function (*dameng).CreateTableSQL() is high (> 15) (gocyclo)
    • session_delete.go
    • Line 98: warning: cyclomatic complexity 28 of function (*Session).delete() is high (> 15) (gocyclo)
    • Line 19: warning: cyclomatic complexity 17 of function (*Session).cacheDelete() is high (> 15) (gocyclo)
    • tests/processors_test.go
    • Line 360: warning: cyclomatic complexity 83 of function TestProcessorsTx() is high (> 15) (gocyclo)
    • Line 126: warning: cyclomatic complexity 38 of function TestProcessors() is high (> 15) (gocyclo)
    • internal/statements/statement.go
    • Line 370: warning: cyclomatic complexity 54 of function (*Statement).asDBCond() is high (> 15) (gocyclo)
    • Line 506: warning: cyclomatic complexity 29 of function (*Statement).buildConds2() is high (> 15) (gocyclo)
    • session_insert.go
    • Line 250: warning: cyclomatic complexity 51 of function (*Session).insertStruct() is high (> 15) (gocyclo)
    • Line 69: warning: cyclomatic complexity 41 of function (*Session).insertMultipleStruct() is high (> 15) (gocyclo)
    • Line 450: warning: cyclomatic complexity 24 of function (*Session).genInsertColumns() is high (> 15) (gocyclo)
    • session_get.go
    • Line 50: warning: cyclomatic complexity 25 of function (*Session).get() is high (> 15) (gocyclo)
    • Line 276: warning: cyclomatic complexity 19 of function (*Session).cacheGet() is high (> 15) (gocyclo)
    • scan.go
    • Line 74: warning: cyclomatic complexity 19 of function genScanResultsByBean() is high (> 15) (gocyclo)
    • Line 21: warning: cyclomatic complexity 19 of function genScanResultsByBeanNullable() is high (> 15) (gocyclo)
    • dialects/mysql.go
    • Line 411: warning: cyclomatic complexity 34 of function (*mysql).GetColumns() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 25 of function (*mysql).SQLType() is high (> 15) (gocyclo)
    • convert/float.go
    • Line 67: warning: cyclomatic complexity 23 of function AsBigFloat() is high (> 15) (gocyclo)
    • Line 16: warning: cyclomatic complexity 21 of function AsFloat64() is high (> 15) (gocyclo)
    • internal/statements/insert.go
    • Line 30: warning: cyclomatic complexity 47 of function (*Statement).GenInsertSQL() is high (> 15) (gocyclo)
    • Line 180: warning: cyclomatic complexity 17 of function (*Statement).GenInsertMapSQL() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!