Preparing report...

Report for github.com/ahmdrz/rate-limit

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


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!


golint40%

Golint is a linter for Go source code.

    • rate-limit/ratelimit.go
    • Line 9: warning: exported var DefaultHandler should have comment or be unexported (golint)
    • Line 13: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 41: warning: exported function InitRateLimit should have comment or be unexported (golint)
    • Line 54: warning: exported method RateLimiter.RateLimit should have comment or be unexported (golint)
    • rate-limit/types.go
    • Line 9: warning: exported type Request should have comment or be unexported (golint)
    • Line 14: warning: exported type RateLimiter should have comment or be unexported (golint)
    • Line 24: warning: exported type HandlerLimiter should have comment or be unexported (golint)
    • rate-limit/whitelist.go
    • Line 3: warning: exported type List should have comment or be unexported (golint)
    • Line 5: warning: exported method List.Add should have comment or be unexported (golint)
    • Line 9: warning: exported method List.HasPrefix should have comment or be unexported (golint)
    • Line 13: warning: exported method List.Remove should have comment or be unexported (golint)
    • Line 17: warning: exported var WhiteList should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign40%

IneffAssign detects ineffectual assignments in Go code.

    • rate-limit/example/function.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/ahmdrz/rate-limit (invalid package name: "") (ineffassign)
    • Line 11: warning: other declaration of main (ineffassign)
    • Line 17: warning: other declaration of mainHandler (ineffassign)
    • Line 12: warning: undeclared name: ratelimit (ineffassign)
    • Line 12: warning: undeclared name: ratelimit (ineffassign)
    • Line 8: warning: "github.com/ahmdrz/rate-limit" imported but not used (ineffassign)
    • rate-limit/example/handler.go
    • Line 11: warning: main redeclared in this block (ineffassign)
    • Line 22: warning: mainHandler redeclared in this block (ineffassign)
    • Line 14: warning: undeclared name: ratelimit (ineffassign)
    • Line 14: warning: undeclared name: ratelimit (ineffassign)
    • Line 8: warning: "github.com/ahmdrz/rate-limit" imported but not used (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!