Preparing report...

Report for github.com/timakin/dsmock

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


gocyclo83%

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.

    • dsmock/parser.go
    • Line 289: warning: cyclomatic complexity 37 of function (*Parser).parseValueWithType() is high (> 15) (gocyclo)

golint16%

Golint is a linter for Go source code.

    • dsmock/const.go
    • Line 3: warning: exported type TypeStyle should have comment or be unexported (golint)
    • Line 6: warning: exported const KeywordKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported type DatastoreType should have comment or be unexported (golint)
    • Line 28: warning: exported const TypeString should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: exported function IsKeyValueName should have comment or be unexported (golint)
    • Line 82: warning: exported function IsCurrentDatetime should have comment or be unexported (golint)
    • Line 86: warning: exported function IsNoIndex should have comment or be unexported (golint)
    • dsmock/dsmock.go
    • Line 5: warning: exported function InsertMockData should have comment or be unexported (golint)
    • dsmock/parser.go
    • Line 18: warning: exported type FileParser should have comment or be unexported (golint)
    • Line 23: warning: exported type KindData should have comment or be unexported (golint)
    • Line 29: warning: exported type Scheme should have comment or be unexported (golint)
    • Line 38: warning: exported type Properties should have comment or be unexported (golint)
    • Line 39: warning: exported type Default should have comment or be unexported (golint)
    • Line 40: warning: exported type Entity should have comment or be unexported (golint)
    • Line 42: warning: exported type Parser should have comment or be unexported (golint)
    • Line 46: warning: exported method Parser.Validate should have comment or be unexported (golint)
    • Line 53: warning: exported method Parser.ParseEntity should have comment or be unexported (golint)
    • Line 91: 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)
    • Line 115: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dsmock/utils.go
    • Line 12: warning: exported function ToString should have comment or be unexported (golint)
    • Line 21: warning: exported function ToFloat64 should have comment or be unexported (golint)
    • Line 28: 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)
    • Line 37: warning: exported function KeyToString should have comment or be unexported (golint)
    • Line 41: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 65: warning: exported function DecodeJSON should have comment or be unexported (golint)
    • dsmock/yaml.go
    • Line 16: warning: exported type YAMLParser should have comment or be unexported (golint)
    • Line 20: warning: exported function NewYAMLParser should have comment or be unexported (golint)
    • Line 28: warning: exported method YAMLParser.ReadFile should have comment or be unexported (golint)
    • Line 42: warning: exported method YAMLParser.Parse should have comment or be unexported (golint)
    • Line 53: 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)

license0%

Checks whether your project has a LICENSE file.


ineffassign66%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!