Preparing report...

Report for github.com/jqiris/xorm

(v0.8.4)

A+    Excellent!    Found 38 issues across 97 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!


gofmt84%

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

    • doc.go
    • Line 1: warning: file is not gofmted with -s (gofmt)

gocyclo74%

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.

    • xorm_test.go
    • Line 40: warning: cyclomatic complexity 28 of function createEngine() is high (> 15) (gocyclo)
    • session.go
    • Line 368: warning: cyclomatic complexity 127 of function (*Session).slice2Bean() is high (> 15) (gocyclo)
    • session_insert.go
    • Line 324: warning: cyclomatic complexity 68 of function (*Session).innerInsert() is high (> 15) (gocyclo)
    • Line 95: warning: cyclomatic complexity 49 of function (*Session).innerInsertMulti() is high (> 15) (gocyclo)
    • Line 581: warning: cyclomatic complexity 28 of function (*Session).genInsertColumns() is high (> 15) (gocyclo)
    • Line 19: warning: cyclomatic complexity 20 of function (*Session).Insert() is high (> 15) (gocyclo)
    • session_delete.go
    • Line 77: warning: cyclomatic complexity 36 of function (*Session).Delete() is high (> 15) (gocyclo)
    • Line 15: warning: cyclomatic complexity 16 of function (*Session).cacheDelete() is high (> 15) (gocyclo)
    • dialect_mysql.go
    • Line 320: warning: cyclomatic complexity 27 of function (*mysql).GetColumns() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 18 of function (*mysql).SqlType() is high (> 15) (gocyclo)
    • session_pk_test.go
    • Line 700: warning: cyclomatic complexity 21 of function TestCompositeKey() is high (> 15) (gocyclo)
    • Line 531: warning: cyclomatic complexity 16 of function TestUint64Id() is high (> 15) (gocyclo)
    • Line 1012: warning: cyclomatic complexity 16 of function TestMyStringId() is high (> 15) (gocyclo)
    • Line 924: warning: cyclomatic complexity 16 of function TestMyIntId() is high (> 15) (gocyclo)
    • session_convert.go
    • Line 88: warning: cyclomatic complexity 111 of function (*Session).bytes2Value() is high (> 15) (gocyclo)
    • Line 535: warning: cyclomatic complexity 35 of function (*Session).value2Interface() is high (> 15) (gocyclo)
    • Line 20: warning: cyclomatic complexity 20 of function (*Session).str2Time() is high (> 15) (gocyclo)
    • processors_test.go
    • Line 384: warning: cyclomatic complexity 84 of function TestProcessorsTx() is high (> 15) (gocyclo)
    • Line 124: warning: cyclomatic complexity 50 of function TestProcessors() is high (> 15) (gocyclo)
    • session_update.go
    • Line 145: warning: cyclomatic complexity 70 of function (*Session).Update() is high (> 15) (gocyclo)
    • Line 424: warning: cyclomatic complexity 32 of function (*Session).genUpdateColumns() is high (> 15) (gocyclo)
    • Line 18: warning: cyclomatic complexity 28 of function (*Session).cacheUpdate() is high (> 15) (gocyclo)
    • session_exist.go
    • Line 17: warning: cyclomatic complexity 18 of function (*Session).Exist() is high (> 15) (gocyclo)
    • convert.go
    • Line 80: warning: cyclomatic complexity 46 of function convertAssign() is high (> 15) (gocyclo)
    • session_find.go
    • Line 321: warning: cyclomatic complexity 40 of function (*Session).cacheFind() is high (> 15) (gocyclo)
    • Line 65: warning: cyclomatic complexity 35 of function (*Session).find() is high (> 15) (gocyclo)
    • Line 198: warning: cyclomatic complexity 22 of function (*Session).noCacheFind() is high (> 15) (gocyclo)
    • session_update_test.go
    • Line 280: warning: cyclomatic complexity 34 of function TestUpdate1() is high (> 15) (gocyclo)
    • Line 602: warning: cyclomatic complexity 25 of function TestUpdateUpdated() is high (> 15) (gocyclo)
    • dialect_postgres.go
    • Line 957: warning: cyclomatic complexity 24 of function (*postgres).GetColumns() is high (> 15) (gocyclo)
    • Line 789: warning: cyclomatic complexity 21 of function (*postgres).SqlType() is high (> 15) (gocyclo)
    • helpers.go
    • Line 19: warning: cyclomatic complexity 22 of function str2PKValue() is high (> 15) (gocyclo)
    • Line 122: warning: cyclomatic complexity 16 of function isZero() is high (> 15) (gocyclo)
    • session_get.go
    • Line 26: warning: cyclomatic complexity 19 of function (*Session).get() is high (> 15) (gocyclo)
    • Line 152: warning: cyclomatic complexity 18 of function (*Session).cacheGet() is high (> 15) (gocyclo)
    • statement.go
    • Line 228: warning: cyclomatic complexity 76 of function (*Statement).buildUpdates() is high (> 15) (gocyclo)
    • Line 1045: warning: cyclomatic complexity 36 of function (*Statement).genSelectSQL() is high (> 15) (gocyclo)
    • engine_cond.go
    • Line 18: warning: cyclomatic complexity 73 of function (*Engine).buildConds() is high (> 15) (gocyclo)
    • engine.go
    • Line 890: warning: cyclomatic complexity 39 of function (*Engine).mapType() is high (> 15) (gocyclo)
    • Line 447: warning: cyclomatic complexity 37 of function (*Engine).dumpTables() is high (> 15) (gocyclo)
    • Line 1206: warning: cyclomatic complexity 26 of function (*Engine).Sync() is high (> 15) (gocyclo)

ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • session_find.go
    • Line 190: warning: ineffectual assignment to err (ineffassign)
    • Line 317: warning: ineffectual assignment to dst (ineffassign)
    • Line 190: warning: ineffectual assignment to err (ineffassign)
    • Line 317: warning: ineffectual assignment to dst (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words

    • engine.go
    • Line 811: warning: "datbase" is a misspelling of "database" (misspell)
    • Line 944: warning: "charactor" is a misspelling of "character" (misspell)
    • Line 948: warning: "charactor" is a misspelling of "character" (misspell)
    • tag.go
    • Line 84: warning: "decribes" is a misspelling of "describes" (misspell)
    • types_test.go
    • Line 271: warning: "Registed" is a misspelling of "Registered" (misspell)
    • Line 271: warning: "Registed" is a misspelling of "Registered" (misspell)
    • Line 275: warning: "Registed" is a misspelling of "Registered" (misspell)
    • Line 321: warning: "Registed" is a misspelling of "Registered" (misspell)
    • Line 338: warning: "Registed" is a misspelling of "Registered" (misspell)