Preparing report...

Report for github.com/xenking/qmgo

A+    Excellent!    Found 26 issues across 54 files

Tweet

gofmt85%

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!


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!


golint66%

Golint is a linter for Go source code.

    • qmgo/options/insert_options.go
    • Line 18: warning: exported type InsertOneOptions should have comment or be unexported (golint)
    • Line 22: warning: exported type InsertManyOptions should have comment or be unexported (golint)
    • qmgo/operator/operate_type.go
    • Line 3: warning: exported type OpType should have comment or be unexported (golint)
    • Line 6: warning: exported const BeforeInsert should have comment (or a comment on this block) or be unexported (golint)
    • qmgo/field_test.go
    • Line 141: warning: don't use underscores in Go names; var id_1 should be id1 (golint)
    • Line 182: warning: don't use underscores in Go names; var id_1 should be id1 (golint)
    • qmgo/collection_test.go
    • Line 719: warning: don't use underscores in Go names; var newDocs_1 should be newDocs1 (golint)
    • Line 724: warning: don't use underscores in Go names; var newDocs_2 should be newDocs2 (golint)
    • Line 729: warning: don't use underscores in Go names; var newDocs_3 should be newDocs3 (golint)
    • qmgo/hook/hook.go
    • Line 91: warning: comment on exported type BeforeInsertHook should be of the form "BeforeInsertHook ..." (with optional leading article) (golint)
    • Line 95: warning: exported type AfterInsertHook should have comment or be unexported (golint)
    • Line 115: warning: comment on exported type BeforeUpdateHook should be of the form "BeforeUpdateHook ..." (with optional leading article) (golint)
    • Line 119: warning: exported type AfterUpdateHook should have comment or be unexported (golint)
    • Line 139: warning: comment on exported type BeforeQueryHook should be of the form "BeforeQueryHook ..." (with optional leading article) (golint)
    • Line 143: warning: exported type AfterQueryHook should have comment or be unexported (golint)
    • Line 163: warning: comment on exported type BeforeRemoveHook should be of the form "BeforeRemoveHook ..." (with optional leading article) (golint)
    • Line 167: warning: exported type AfterRemoveHook should have comment or be unexported (golint)
    • Line 187: warning: comment on exported type BeforeUpsertHook should be of the form "BeforeUpsertHook ..." (with optional leading article) (golint)
    • Line 191: warning: exported type AfterUpsertHook should have comment or be unexported (golint)
    • Line 215: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • qmgo/field/field.go
    • Line 135: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.

    • qmgo/client.go
    • Line 354: warning: ineffectual assignment to err (ineffassign)
    • Line 358: warning: ineffectual assignment to err (ineffassign)
    • Line 367: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!