Preparing report...

Report for github.com/InVisionApp/rye

A+    Excellent!    Found 12 issues across 26 files

Tweet

gofmt92%

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!


golint61%

Golint is a linter for Go source code.

    • rye/middleware_jwt.go
    • Line 6: warning: exported const CONTEXT_JWT should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: comment on exported function NewMiddlewareJWT should be of the form "NewMiddlewareJWT ..." (golint)
    • rye/middleware_jwt_test.go
    • Line 17: warning: don't use underscores in Go names; var shared_secret should be sharedSecret (golint)
    • Line 18: warning: don't use underscores in Go names; var hs256_jwt should be hs256Jwt (golint)
    • Line 19: warning: don't use underscores in Go names; var rs256_jwt should be rs256Jwt (golint)
    • rye/rye.go
    • Line 75: warning: comment on exported function NewMWHandler should be of the form "NewMWHandler ..." (golint)
    • Line 89: warning: comment on exported method MWHandler.Handle should be of the form "Handle ..." (golint)
    • rye/fakes/statsdfakes/fake_statter.go
    • Line 1: warning: package comment should be of the form "Package statsdfakes ..." (golint)
    • Line 11: warning: exported type FakeStatter should have comment or be unexported (golint)
    • Line 125: warning: exported method FakeStatter.Inc should have comment or be unexported (golint)
    • Line 136: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 141: warning: exported method FakeStatter.IncCallCount should have comment or be unexported (golint)
    • Line 147: warning: exported method FakeStatter.IncArgsForCall should have comment or be unexported (golint)
    • Line 153: warning: exported method FakeStatter.IncReturns should have comment or be unexported (golint)
    • Line 160: warning: exported method FakeStatter.Dec should have comment or be unexported (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 176: warning: exported method FakeStatter.DecCallCount should have comment or be unexported (golint)
    • Line 182: warning: exported method FakeStatter.DecArgsForCall should have comment or be unexported (golint)
    • Line 188: warning: exported method FakeStatter.DecReturns should have comment or be unexported (golint)
    • Line 195: warning: exported method FakeStatter.Gauge should have comment or be unexported (golint)
    • Line 206: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 211: warning: exported method FakeStatter.GaugeCallCount should have comment or be unexported (golint)
    • Line 217: warning: exported method FakeStatter.GaugeArgsForCall should have comment or be unexported (golint)
    • Line 223: warning: exported method FakeStatter.GaugeReturns should have comment or be unexported (golint)
    • Line 230: warning: exported method FakeStatter.GaugeDelta should have comment or be unexported (golint)
    • Line 241: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 246: warning: exported method FakeStatter.GaugeDeltaCallCount should have comment or be unexported (golint)
    • Line 252: warning: exported method FakeStatter.GaugeDeltaArgsForCall should have comment or be unexported (golint)
    • Line 258: warning: exported method FakeStatter.GaugeDeltaReturns should have comment or be unexported (golint)
    • Line 265: warning: exported method FakeStatter.Timing should have comment or be unexported (golint)
    • Line 276: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 281: warning: exported method FakeStatter.TimingCallCount should have comment or be unexported (golint)
    • Line 287: warning: exported method FakeStatter.TimingArgsForCall should have comment or be unexported (golint)
    • Line 293: warning: exported method FakeStatter.TimingReturns should have comment or be unexported (golint)
    • Line 300: warning: exported method FakeStatter.TimingDuration should have comment or be unexported (golint)
    • Line 311: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 316: warning: exported method FakeStatter.TimingDurationCallCount should have comment or be unexported (golint)
    • Line 322: warning: exported method FakeStatter.TimingDurationArgsForCall should have comment or be unexported (golint)
    • Line 328: warning: exported method FakeStatter.TimingDurationReturns should have comment or be unexported (golint)
    • Line 335: warning: exported method FakeStatter.Set should have comment or be unexported (golint)
    • Line 346: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 351: warning: exported method FakeStatter.SetCallCount should have comment or be unexported (golint)
    • Line 357: warning: exported method FakeStatter.SetArgsForCall should have comment or be unexported (golint)
    • Line 363: warning: exported method FakeStatter.SetReturns should have comment or be unexported (golint)
    • Line 370: warning: exported method FakeStatter.SetInt should have comment or be unexported (golint)
    • Line 381: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 386: warning: exported method FakeStatter.SetIntCallCount should have comment or be unexported (golint)
    • Line 392: warning: exported method FakeStatter.SetIntArgsForCall should have comment or be unexported (golint)
    • Line 398: warning: exported method FakeStatter.SetIntReturns should have comment or be unexported (golint)
    • Line 405: warning: exported method FakeStatter.Raw should have comment or be unexported (golint)
    • Line 416: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 421: warning: exported method FakeStatter.RawCallCount should have comment or be unexported (golint)
    • Line 427: warning: exported method FakeStatter.RawArgsForCall should have comment or be unexported (golint)
    • Line 433: warning: exported method FakeStatter.RawReturns should have comment or be unexported (golint)
    • Line 440: warning: exported method FakeStatter.NewSubStatter should have comment or be unexported (golint)
    • Line 449: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 454: warning: exported method FakeStatter.NewSubStatterCallCount should have comment or be unexported (golint)
    • Line 460: warning: exported method FakeStatter.NewSubStatterArgsForCall should have comment or be unexported (golint)
    • Line 466: warning: exported method FakeStatter.NewSubStatterReturns should have comment or be unexported (golint)
    • Line 473: warning: exported method FakeStatter.SetPrefix should have comment or be unexported (golint)
    • Line 485: warning: exported method FakeStatter.SetPrefixCallCount should have comment or be unexported (golint)
    • Line 491: warning: exported method FakeStatter.SetPrefixArgsForCall should have comment or be unexported (golint)
    • Line 497: warning: exported method FakeStatter.Close should have comment or be unexported (golint)
    • Line 504: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 509: warning: exported method FakeStatter.CloseCallCount should have comment or be unexported (golint)
    • Line 515: warning: exported method FakeStatter.CloseReturns should have comment or be unexported (golint)
    • Line 522: warning: exported method FakeStatter.Invocations should have comment or be unexported (golint)
    • rye/middleware_auth.go
    • Line 31: warning: exported type AuthFunc should have comment or be unexported (golint)
    • Line 33: warning: exported function NewMiddlewareAuth should have comment or be unexported (golint)
    • Line 51: warning: exported function NewBasicAuthFunc should have comment or be unexported (golint)
    • Line 57: warning: exported const AUTH_USERNAME_KEY should have comment or be unexported (golint)
    • Line 85: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 117: warning: exported function NewJWTAuthFunc should have comment or be unexported (golint)
    • Line 149: warning: should not use basic type string as key in context.WithValue (golint)
    • rye/middleware_cors.go
    • Line 8: warning: comment on exported const DEFAULT_CORS_ALLOW_ORIGIN should be of the form "DEFAULT_CORS_ALLOW_ORIGIN ..." (golint)
    • Line 10: warning: exported const DEFAULT_CORS_ALLOW_METHODS should have comment (or a comment on this block) or be unexported (golint)
    • rye/doc.go
    • Line 1: warning: package comment should be of the form "Package rye ..." (golint)

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!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!