Preparing report...

Report for github.com/lab259/repository

A+    Excellent!    Found 23 issues across 47 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


golint53%

Golint is a linter for Go source code.

    • repository/repository.go
    • Line 3: warning: exported type RepositoryProvider should have comment or be unexported (golint)
    • Line 10: warning: exported type Repository should have comment or be unexported (golint)
    • Line 17: warning: exported type RepositoryConfig should have comment or be unexported (golint)
    • Line 24: warning: exported function NewRepository should have comment or be unexported (golint)
    • Line 33: warning: exported method Repository.GetCollectionName should have comment or be unexported (golint)
    • Line 37: warning: exported method Repository.GetQueryRunner should have comment or be unexported (golint)
    • Line 41: warning: exported method Repository.GetDefaultCriteria should have comment or be unexported (golint)
    • Line 45: warning: exported method Repository.GetDefaultSorting should have comment or be unexported (golint)
    • Line 49: warning: exported method Repository.CountAndFindAll should have comment or be unexported (golint)
    • Line 53: warning: exported method Repository.Count should have comment or be unexported (golint)
    • Line 57: warning: exported method Repository.Create should have comment or be unexported (golint)
    • Line 61: warning: exported method Repository.DeleteAll should have comment or be unexported (golint)
    • Line 65: warning: exported method Repository.Delete should have comment or be unexported (golint)
    • Line 69: warning: exported method Repository.FindAll should have comment or be unexported (golint)
    • Line 73: warning: exported method Repository.FindByID should have comment or be unexported (golint)
    • Line 77: warning: exported method Repository.Find should have comment or be unexported (golint)
    • Line 81: warning: exported method Repository.UpdateRawWithCriteria should have comment or be unexported (golint)
    • Line 85: warning: exported method Repository.UpdateAndFind should have comment or be unexported (golint)
    • Line 89: warning: exported method Repository.Update should have comment or be unexported (golint)
    • Line 93: warning: exported method Repository.UpdateRaw should have comment or be unexported (golint)
    • Line 97: warning: exported method Repository.Upsert should have comment or be unexported (golint)
    • repository/simple_query_runner.go
    • Line 7: warning: exported type MgoServiceRunner should have comment or be unexported (golint)
    • Line 11: warning: exported type SimpleQueryRunner should have comment or be unexported (golint)
    • Line 16: warning: exported function NewSimpleQueryRunner should have comment or be unexported (golint)
    • repository/binary_operator.go
    • Line 10: warning: comment on exported const BinaryOperatorTypeEq should be of the form "BinaryOperatorTypeEq ..." (golint)
    • Line 12: warning: exported const BinaryOperatorTypeGT should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: comment on exported const BinaryOperatorTypeExists should be of the form "BinaryOperatorTypeExists ..." (golint)
    • Line 23: warning: comment on exported const BinaryOperatorTypeRegex should be of the form "BinaryOperatorTypeRegex ..." (golint)
    • Line 27: warning: exported type BinaryOperator should have comment or be unexported (golint)
    • Line 31: warning: exported type BinaryOperatorImpl should have comment or be unexported (golint)
    • Line 38: warning: exported method BinaryOperatorImpl.GetCondition should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • repository/operators_logical.go
    • Line 3: warning: exported function And should have comment or be unexported (golint)
    • Line 10: warning: exported function Nor should have comment or be unexported (golint)
    • Line 17: warning: exported function Not should have comment or be unexported (golint)
    • Line 27: warning: exported function Or should have comment or be unexported (golint)
    • repository/queries.go
    • Line 3: warning: exported function WithPage should have comment or be unexported (golint)
    • Line 7: warning: exported function Skip should have comment or be unexported (golint)
    • Line 11: warning: exported function Limit should have comment or be unexported (golint)
    • Line 15: warning: exported function ByID should have comment or be unexported (golint)
    • Line 23: warning: exported function WithCriteria should have comment or be unexported (golint)
    • Line 29: warning: exported function WithSort should have comment or be unexported (golint)
    • repository/query.go
    • Line 11: warning: comment on exported type QueryBuilder should be of the form "QueryBuilder ..." (with optional leading article) (golint)
    • Line 94: warning: exported function ApplyQueryModifiers should have comment or be unexported (golint)
    • Line 171: warning: exported function NewErrTypeNotSupported should have comment or be unexported (golint)
    • repository/boolean_operator.go
    • Line 10: warning: exported const OperatorAnd should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: comment on exported const OperatorText should be of the form "OperatorText ..." (golint)
    • Line 18: warning: comment on exported const OperatorTypeElemMatch should be of the form "OperatorTypeElemMatch ..." (golint)
    • Line 22: warning: exported type BooleanOperator should have comment or be unexported (golint)
    • Line 28: warning: exported method BooleanOperator.GetCondition should have comment or be unexported (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • repository/criteria.go
    • Line 7: warning: exported type Criteria should have comment or be unexported (golint)
    • Line 11: warning: exported method Criteria.GetQuery should have comment or be unexported (golint)
    • Line 30: warning: exported type RawCriteria should have comment or be unexported (golint)
    • Line 32: warning: exported method RawCriteria.GetQuery should have comment or be unexported (golint)
    • repository/operators_comparison.go
    • Line 3: warning: exported function EQ should have comment or be unexported (golint)
    • Line 7: warning: exported function GT should have comment or be unexported (golint)
    • Line 11: warning: exported function GTE should have comment or be unexported (golint)
    • Line 15: warning: exported function IN should have comment or be unexported (golint)
    • Line 19: warning: exported function LT should have comment or be unexported (golint)
    • Line 23: warning: exported function LTE should have comment or be unexported (golint)
    • Line 27: warning: exported function NE should have comment or be unexported (golint)
    • Line 31: warning: exported function NIN should have comment or be unexported (golint)
    • repository/limit.go
    • Line 7: warning: exported type OperatorSkipLimit should have comment or be unexported (golint)
    • Line 12: warning: exported method OperatorSkipLimit.Apply should have comment or be unexported (golint)
    • repository/operators_evaluation.go
    • Line 5: warning: exported function Regex should have comment or be unexported (golint)
    • Line 21: warning: exported type FindText should have comment or be unexported (golint)
    • Line 28: warning: exported function Text should have comment or be unexported (golint)

gocyclo97%

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.


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!


misspell95%

Misspell Finds commonly misspelled English words