Preparing report...

Report for github.com/goasana/asana

A+    Excellent!    Found 59 issues across 193 files

Tweet

gofmt86%

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


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!


gocyclo80%

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.

    • asana/tree.go
    • Line 294: warning: cyclomatic complexity 36 of function (*Tree).match() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 31 of function (*Tree).addTree() is high (> 15) (gocyclo)
    • Line 479: warning: cyclomatic complexity 25 of function splitSegment() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 23 of function (*Tree).addSeg() is high (> 15) (gocyclo)
    • Line 394: warning: cyclomatic complexity 20 of function (*leafInfo).match() is high (> 15) (gocyclo)
    • asana/orm/orm_raw.go
    • Line 87: warning: cyclomatic complexity 36 of function (*rawSet).setFieldValue() is high (> 15) (gocyclo)
    • Line 411: warning: cyclomatic complexity 32 of function (*rawSet).QueryRows() is high (> 15) (gocyclo)
    • Line 277: warning: cyclomatic complexity 27 of function (*rawSet).QueryRow() is high (> 15) (gocyclo)
    • Line 577: warning: cyclomatic complexity 27 of function (*rawSet).readValues() is high (> 15) (gocyclo)
    • Line 702: warning: cyclomatic complexity 24 of function (*rawSet).queryRowsTo() is high (> 15) (gocyclo)
    • asana/utils/debug.go
    • Line 164: warning: cyclomatic complexity 54 of function printKeyValue() is high (> 15) (gocyclo)
    • Line 374: warning: cyclomatic complexity 17 of function PrintPointerInfo() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 17 of function isSimpleType() is high (> 15) (gocyclo)
    • asana/router.go
    • Line 660: warning: cyclomatic complexity 75 of function (*ControllerRegister).ServeHTTP() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 40 of function (*ControllerRegister).getURL() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 16 of function (*ControllerRegister).addWithMethodParams() is high (> 15) (gocyclo)
    • asana/cache/cache_test.go
    • Line 123: warning: cyclomatic complexity 20 of function TestGCache() is high (> 15) (gocyclo)
    • Line 46: warning: cyclomatic complexity 20 of function TestCache() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 18 of function TestFileCache() is high (> 15) (gocyclo)
    • asana/httplib/httplib.go
    • Line 435: warning: cyclomatic complexity 20 of function (*AsanaHTTPRequest).DoRequest() is high (> 15) (gocyclo)
    • Line 367: warning: cyclomatic complexity 17 of function (*AsanaHTTPRequest).buildURL() is high (> 15) (gocyclo)
    • asana/app.go
    • Line 64: warning: cyclomatic complexity 35 of function (*App).Run() is high (> 15) (gocyclo)
    • asana/templatefunc_test.go
    • Line 247: warning: cyclomatic complexity 26 of function TestParseFormTag() is high (> 15) (gocyclo)
    • Line 112: warning: cyclomatic complexity 19 of function TestParseForm() is high (> 15) (gocyclo)
    • asana/parser.go
    • Line 255: warning: cyclomatic complexity 24 of function parseComment() is high (> 15) (gocyclo)
    • Line 411: warning: cyclomatic complexity 20 of function genRouterCode() is high (> 15) (gocyclo)
    • asana/orm/cmd.go
    • Line 100: warning: cyclomatic complexity 35 of function (*commandSyncDb).Run() is high (> 15) (gocyclo)
    • asana/orm/db.go
    • Line 1413: warning: cyclomatic complexity 73 of function (*dbBase).setFieldValue() is high (> 15) (gocyclo)
    • Line 1255: warning: cyclomatic complexity 54 of function (*dbBase).convertValueFromDB() is high (> 15) (gocyclo)
    • Line 119: warning: cyclomatic complexity 51 of function (*dbBase).collectFieldValue() is high (> 15) (gocyclo)
    • Line 912: warning: cyclomatic complexity 49 of function (*dbBase).ReadBatch() is high (> 15) (gocyclo)
    • Line 1605: warning: cyclomatic complexity 31 of function (*dbBase).ReadValues() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 21 of function (*dbBase).InsertOrUpdate() is high (> 15) (gocyclo)
    • Line 1168: warning: cyclomatic complexity 18 of function (*dbBase).GenerateOperatorSQL() is high (> 15) (gocyclo)
    • Line 724: warning: cyclomatic complexity 17 of function (*dbBase).UpdateBatch() is high (> 15) (gocyclo)
    • Line 832: warning: cyclomatic complexity 16 of function (*dbBase).DeleteBatch() is high (> 15) (gocyclo)
    • asana/templatefunc.go
    • Line 274: warning: cyclomatic complexity 46 of function parseFormToStruct() is high (> 15) (gocyclo)
    • Line 718: warning: cyclomatic complexity 18 of function MapGet() is high (> 15) (gocyclo)
    • asana/orm/cmd_utils.go
    • Line 137: warning: cyclomatic complexity 30 of function getDbCreateSQL() is high (> 15) (gocyclo)
    • Line 45: warning: cyclomatic complexity 27 of function getColumnTyp() is high (> 15) (gocyclo)

golint98%

Golint is a linter for Go source code.

    • asana/orm/db_alias.go
    • Line 108: warning: exported type DB should have comment or be unexported (golint)
    • Line 114: warning: exported method DB.Begin should have comment or be unexported (golint)
    • Line 118: warning: exported method DB.BeginTx should have comment or be unexported (golint)
    • Line 140: warning: exported method DB.Prepare should have comment or be unexported (golint)
    • Line 144: warning: exported method DB.PrepareContext should have comment or be unexported (golint)
    • Line 148: warning: exported method DB.Exec should have comment or be unexported (golint)
    • Line 156: warning: exported method DB.ExecContext should have comment or be unexported (golint)
    • Line 164: warning: exported method DB.Query should have comment or be unexported (golint)
    • Line 172: warning: exported method DB.QueryContext should have comment or be unexported (golint)
    • Line 180: warning: exported method DB.QueryRow should have comment or be unexported (golint)
    • Line 189: warning: exported method DB.QueryRowContext should have comment or be unexported (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!