Preparing report...

Report for github.com/kat-co/concurrency-in-go-src

A+    Excellent!    Found 57 issues across 77 files

Tweet

gofmt97%

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!


gocyclo90%

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.


golint92%

Golint is a linter for Go source code.

    • concurrency-in-go-src/concurrency-at-scale/rate-limiting/fig-multi-rate-limit.go
    • Line 46: warning: exported function Per should have comment or be unexported (golint)
    • Line 49: warning: exported function Open should have comment or be unexported (golint)
    • Line 57: warning: exported type APIConnection should have comment or be unexported (golint)
    • Line 61: warning: exported method APIConnection.ReadFile should have comment or be unexported (golint)
    • Line 69: warning: exported method APIConnection.ResolveAddress should have comment or be unexported (golint)
    • Line 77: warning: exported type RateLimiter should have comment or be unexported (golint)
    • Line 82: warning: exported function MultiLimiter should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign27%

IneffAssign detects ineffectual assignments in Go code.

    • concurrency-in-go-src/concurrency-at-scale/rate-limiting/fig-multi-rate-limit.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import golang.org/x/time/rate (invalid package name: "") (ineffassign)
    • Line 13: warning: other declaration of main (ineffassign)
    • Line 49: warning: other declaration of Open (ineffassign)
    • Line 57: warning: other declaration of APIConnection (ineffassign)
    • Line 13: warning: other declaration of main (ineffassign)
    • Line 49: warning: other declaration of Open (ineffassign)
    • Line 57: warning: other declaration of APIConnection (ineffassign)
    • Line 13: warning: other declaration of main (ineffassign)
    • Line 46: warning: other declaration of Per (ineffassign)
    • Line 77: warning: other declaration of RateLimiter (ineffassign)
    • Line 82: warning: other declaration of MultiLimiter (ineffassign)
    • Line 90: warning: other declaration of multiLimiter (ineffassign)
    • Line 61: warning: other declaration of ReadFile (ineffassign)
    • Line 69: warning: other declaration of ResolveAddress (ineffassign)
    • Line 61: warning: other declaration of ReadFile (ineffassign)
    • Line 69: warning: other declaration of ResolveAddress (ineffassign)
    • Line 94: warning: other declaration of Wait (ineffassign)
    • Line 103: warning: other declaration of Limit (ineffassign)
    • concurrency-in-go-src/concurrency-patterns-in-go/the-context-package/fig-greeter-with-done-chan.go
    • Line 9: warning: main redeclared in this block (ineffassign)
    • Line 35: warning: printGreeting redeclared in this block (ineffassign)
    • Line 44: warning: printFarewell redeclared in this block (ineffassign)
    • Line 53: warning: genGreeting redeclared in this block (ineffassign)
    • Line 63: warning: genFarewell redeclared in this block (ineffassign)
    • Line 73: warning: locale redeclared in this block (ineffassign)
    • Line 17: warning: cannot use done (variable of type chan interface{}) as context.Context value in argument to printGreeting: missing method Deadline (ineffassign)
    • Line 26: warning: cannot use done (variable of type chan interface{}) as context.Context value in argument to printFarewell: missing method Deadline (ineffassign)
    • Line 36: warning: cannot use done (variable of type <-chan interface{}) as context.Context value in argument to genGreeting: missing method Deadline (ineffassign)
    • Line 45: warning: cannot use done (variable of type <-chan interface{}) as context.Context value in argument to genFarewell: missing method Deadline (ineffassign)
    • Line 54: warning: cannot use done (variable of type <-chan interface{}) as context.Context value in argument to locale: missing method Deadline (ineffassign)
    • Line 64: warning: cannot use done (variable of type <-chan interface{}) as context.Context value in argument to locale: missing method Deadline (ineffassign)
    • concurrency-in-go-src/concurrency-at-scale/error-propagation/fig-error-propagation.go
    • Line 11: warning: MyError redeclared in this block (ineffassign)
    • Line 18: warning: wrapError redeclared in this block (ineffassign)
    • Line 33: warning: LowLevelErr redeclared in this block (ineffassign)
    • Line 37: warning: isGloballyExec redeclared in this block (ineffassign)
    • Line 47: warning: IntermediateErr redeclared in this block (ineffassign)
    • Line 51: warning: runJob redeclared in this block (ineffassign)
    • Line 63: warning: handleError redeclared in this block (ineffassign)
    • Line 69: warning: main redeclared in this block (ineffassign)
    • Line 27: warning: method Error already declared for type MyError struct{Inner error; Message string; StackTrace string; Misc map[string]interface{}} (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!