Preparing report...

Report for github.com/btnguyen2k/gocosmos

(v0.2.0)

A    Great!    Found 14 issues across 20 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!


gofmt90%

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


gocyclo45%

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.

    • restclient_database_test.go
    • Line 53: warning: cyclomatic complexity 37 of function TestRestClient_ChangeOfferDatabase() is high (> 15) (gocyclo)
    • Line 9: warning: cyclomatic complexity 21 of function TestRestClient_CreateDatabase() is high (> 15) (gocyclo)
    • restclient_collection_test.go
    • Line 68: warning: cyclomatic complexity 37 of function TestRestClient_ChangeOfferCollection() is high (> 15) (gocyclo)
    • Line 9: warning: cyclomatic complexity 28 of function TestRestClient_CreateCollection() is high (> 15) (gocyclo)
    • Line 301: warning: cyclomatic complexity 20 of function TestRestClient_GetCollection() is high (> 15) (gocyclo)
    • Line 217: warning: cyclomatic complexity 19 of function TestRestClient_ReplaceCollection() is high (> 15) (gocyclo)
    • stmt.go
    • Line 38: warning: cyclomatic complexity 28 of function parseQueryWithDefaultDb() is high (> 15) (gocyclo)
    • restclient_document_query_test.go
    • Line 372: warning: cyclomatic complexity 26 of function _verifyGroupByRespQueryDocs() is high (> 15) (gocyclo)
    • Line 230: warning: cyclomatic complexity 25 of function _verifyOrderByRespQueryDocs() is high (> 15) (gocyclo)
    • Line 291: warning: cyclomatic complexity 25 of function _verifyGroupByDriverSelect() is high (> 15) (gocyclo)
    • Line 964: warning: cyclomatic complexity 23 of function _testRestClientQueryDocumentsContinuation() is high (> 15) (gocyclo)
    • Line 191: warning: cyclomatic complexity 22 of function _verifyOrderByDriverSelect() is high (> 15) (gocyclo)
    • Line 623: warning: cyclomatic complexity 18 of function _testRestClientQueryDocumentsPkrangeid() is high (> 15) (gocyclo)
    • Line 99: warning: cyclomatic complexity 17 of function _verifyResultRespQueryDocs() is high (> 15) (gocyclo)
    • gocosmos_select_test.go
    • Line 481: warning: cyclomatic complexity 25 of function Test_Query_Select() is high (> 15) (gocyclo)
    • Line 635: warning: cyclomatic complexity 25 of function Test_Query_SelectPlaceholder() is high (> 15) (gocyclo)
    • Line 730: warning: cyclomatic complexity 21 of function Test_Query_SelectPkranges() is high (> 15) (gocyclo)
    • restclient.go
    • Line 613: warning: cyclomatic complexity 24 of function (*RestClient).queryAndMerge() is high (> 15) (gocyclo)
    • restclient_test.go
    • Line 85: warning: cyclomatic complexity 21 of function _testRestClientQueryPlan() is high (> 15) (gocyclo)
    • stmt_collection.go
    • Line 36: warning: cyclomatic complexity 21 of function (*StmtCreateCollection).parse() is high (> 15) (gocyclo)
    • restclient_document_crud_test.go
    • Line 250: warning: cyclomatic complexity 55 of function TestRestClient_ReplaceDocument() is high (> 15) (gocyclo)
    • Line 11: warning: cyclomatic complexity 42 of function TestRestClient_CreateDocument() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 41 of function TestRestClient_UpsertDocument() is high (> 15) (gocyclo)
    • Line 389: warning: cyclomatic complexity 35 of function TestRestClient_GetDocument() is high (> 15) (gocyclo)
    • Line 349: warning: cyclomatic complexity 16 of function TestRestClient_ReplaceDocumentCrossPartitions() is high (> 15) (gocyclo)
    • gocosmos_test.go
    • Line 878: warning: cyclomatic complexity 36 of function Test_Exec_Delete() is high (> 15) (gocyclo)
    • Line 1023: warning: cyclomatic complexity 26 of function Test_Exec_UpdatePlaceholder() is high (> 15) (gocyclo)
    • Line 760: warning: cyclomatic complexity 23 of function Test_Exec_Upsert() is high (> 15) (gocyclo)
    • Line 964: warning: cyclomatic complexity 22 of function Test_Exec_Update() is high (> 15) (gocyclo)
    • Line 817: warning: cyclomatic complexity 21 of function Test_Exec_UpsertPlaceholder() is high (> 15) (gocyclo)
    • Line 361: warning: cyclomatic complexity 19 of function Test_Exec_CreateCollection() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 18 of function Test_Exec_CreateDatabase() is high (> 15) (gocyclo)
    • stmt_document.go
    • Line 27: warning: cyclomatic complexity 18 of function _parseValue() is high (> 15) (gocyclo)
    • Line 614: warning: cyclomatic complexity 16 of function (*StmtUpdate).Exec() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell90%

Misspell Finds commonly misspelled English words