Preparing report...

Report for github.com/zerobotlabs/relax

A    Great!    Found 6 issues across 8 files

Tweet

gofmt87%

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!


gocyclo87%

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.

    • relax/slack/client.go
    • Line 365: warning: cyclomatic complexity 33 of function startReadFromRedisPubSubLoop() is high (> 15) (gocyclo)
    • Line 574: warning: cyclomatic complexity 24 of function (*Client).handleMessage() is high (> 15) (gocyclo)

golint37%

Golint is a linter for Go source code.

    • relax/healthcheck/healthcheck.go
    • Line 11: warning: exported type HealthCheckServer should have comment or be unexported (golint)
    • Line 20: warning: exported method HealthCheckServer.Start should have comment or be unexported (golint)
    • relax/slack/client.go
    • Line 27: warning: comment on exported var Clients should be of the form "Clients ..." (golint)
    • Line 84: warning: exported method Client.ResetHeartBeatsMissed should have comment or be unexported (golint)
    • Line 90: warning: exported method Client.IncrementHeartBeatsMissed should have comment or be unexported (golint)
    • Line 121: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 143: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 173: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 220: warning: comment on exported method Client.LoginAndStart should be of the form "LoginAndStart ..." (golint)
    • Line 243: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • Line 320: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 713: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 719: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 722: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • relax/slack/datatypes.go
    • Line 23: warning: exported type Command should have comment or be unexported (golint)
    • Line 33: warning: exported type Payload should have comment or be unexported (golint)
    • Line 45: warning: exported type Field should have comment or be unexported (golint)
    • Line 51: warning: exported type ConfirmAction should have comment or be unexported (golint)
    • Line 58: warning: exported type Action should have comment or be unexported (golint)
    • Line 67: warning: exported type Attachment should have comment or be unexported (golint)
    • Line 115: warning: exported method Message.UserId should have comment or be unexported (golint)
    • Line 127: warning: exported method Message.ChannelId should have comment or be unexported (golint)
    • Line 139: warning: exported method Message.EmbeddedMessage should have comment or be unexported (golint)
    • Line 153: warning: exported method Message.EmbeddedItem should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign87%

IneffAssign detects ineffectual assignments in Go code.


misspell75%

Misspell Finds commonly misspelled English words