Preparing report...

Report for github.com/axetroy/gmock

A+    Excellent!    Found 17 issues across 31 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!


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.

    • gmock/server.go
    • Line 53: warning: cyclomatic complexity 19 of function (Handler).ServeHTTP() is high (> 15) (gocyclo)

golint45%

Golint is a linter for Go source code.

    • gmock/server.go
    • Line 15: warning: comment on exported var RootDir should be of the form "RootDir ..." (golint)
    • Line 18: warning: exported type Handler should have comment or be unexported (golint)
    • Line 139: warning: exported function Server should have comment or be unexported (golint)
    • gmock/lib/mock/mock.go
    • Line 7: warning: exported type Mock should have comment or be unexported (golint)
    • Line 10: warning: exported method Mock.AmountWithCurrency should have comment or be unexported (golint)
    • Line 14: warning: exported method Mock.Currency should have comment or be unexported (golint)
    • Line 18: warning: exported method Mock.CreditCardNumber should have comment or be unexported (golint)
    • Line 22: warning: exported method Mock.CreditCardType should have comment or be unexported (golint)
    • Line 26: warning: exported method Mock.Century should have comment or be unexported (golint)
    • Line 30: warning: exported method Mock.Date should have comment or be unexported (golint)
    • Line 34: warning: exported method Mock.DayOfMonth should have comment or be unexported (golint)
    • Line 38: warning: exported method Mock.DayOfWeek should have comment or be unexported (golint)
    • Line 42: warning: exported method Mock.YearString should have comment or be unexported (golint)
    • Line 46: warning: exported method Mock.E164PhoneNumber should have comment or be unexported (golint)
    • Line 50: warning: exported method Mock.Name should have comment or be unexported (golint)
    • Line 54: warning: exported method Mock.Username should have comment or be unexported (golint)
    • Line 58: warning: exported method Mock.LastName should have comment or be unexported (golint)
    • Line 62: warning: exported method Mock.FirstName should have comment or be unexported (golint)
    • Line 66: warning: exported method Mock.FirstNameFemale should have comment or be unexported (golint)
    • Line 70: warning: exported method Mock.FirstNameMale should have comment or be unexported (golint)
    • Line 74: warning: exported method Mock.DomainName should have comment or be unexported (golint)
    • Line 78: warning: exported method Mock.Email should have comment or be unexported (golint)
    • Line 82: warning: exported method Mock.IPv4 should have comment or be unexported (golint)
    • Line 86: warning: exported method Mock.IPv6 should have comment or be unexported (golint)
    • Line 90: warning: exported method Mock.MacAddress should have comment or be unexported (golint)
    • Line 94: warning: exported method Mock.URL should have comment or be unexported (golint)
    • Line 98: warning: exported method Mock.Latitude should have comment or be unexported (golint)
    • Line 102: warning: exported method Mock.Longitude should have comment or be unexported (golint)
    • Line 106: warning: exported method Mock.MonthName should have comment or be unexported (golint)
    • Line 110: warning: exported method Mock.Paragraph should have comment or be unexported (golint)
    • Line 114: warning: exported method Mock.Password should have comment or be unexported (golint)
    • Line 118: warning: exported method Mock.PhoneNumber should have comment or be unexported (golint)
    • Line 122: warning: exported method Mock.RandomUnixTime should have comment or be unexported (golint)
    • Line 126: warning: exported method Mock.TimeString should have comment or be unexported (golint)
    • Line 130: warning: exported method Mock.Timeperiod should have comment or be unexported (golint)
    • Line 134: warning: exported method Mock.Timestamp should have comment or be unexported (golint)
    • Line 138: warning: exported method Mock.Timezone should have comment or be unexported (golint)
    • Line 142: warning: exported method Mock.TitleFemale should have comment or be unexported (golint)
    • Line 146: warning: exported method Mock.TitleMale should have comment or be unexported (golint)
    • Line 150: warning: exported method Mock.TollFreePhoneNumber should have comment or be unexported (golint)
    • Line 154: warning: exported method Mock.UUIDDigit should have comment or be unexported (golint)
    • Line 158: warning: exported method Mock.UUIDHyphenated should have comment or be unexported (golint)
    • Line 162: warning: exported method Mock.UnixTime should have comment or be unexported (golint)
    • Line 166: warning: exported method Mock.Word should have comment or be unexported (golint)
    • Line 170: warning: exported method Mock.Sentence should have comment or be unexported (golint)
    • gmock/cmd/gmock/main.go
    • Line 26: 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)
    • gmock/render.go
    • Line 25: warning: exported type Schema 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)
    • Line 62: warning: exported function ParseQuery should have comment or be unexported (golint)
    • Line 91: warning: comment on exported function Render should be of the form "Render ..." (golint)
    • Line 143: 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 181: 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 196: 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 214: 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 236: 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)
    • gmock/function/base64.go
    • Line 7: warning: exported function Base64Encoding should have comment or be unexported (golint)
    • Line 11: warning: exported function Base64Decoding should have comment or be unexported (golint)
    • gmock/loopup.go
    • Line 12: warning: exported const ROUTER_PARAMS_PLACEHOLDER should have comment or be unexported (golint)
    • Line 14: warning: exported function NameToRegExp should have comment or be unexported (golint)
    • Line 32: warning: exported function MatchFileName should have comment or be unexported (golint)
    • Line 36: warning: exported function GetRealFileName should have comment or be unexported (golint)
    • Line 43: warning: exported function ExtractParamsFromFileName should have comment or be unexported (golint)
    • Line 72: 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)
    • gmock/lib/daemon/daemon.go
    • Line 12: warning: exported type Action should have comment or be unexported (golint)
    • Line 32: warning: exported function Start should have comment or be unexported (golint)
    • Line 54: 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!


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!