Preparing report...

Report for github.com/c16a/hermes

A    Great!    Found 13 issues across 17 files

Tweet

gofmt88%

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!


gocyclo94%

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.


golint23%

Golint is a linter for Go source code.

    • hermes/lib/logging/logger.go
    • Line 14: warning: exported function GetLogger should have comment or be unexported (golint)
    • Line 29: warning: exported function LogControlPacket should have comment or be unexported (golint)
    • Line 37: warning: exported function LogOutgoingPacket should have comment or be unexported (golint)
    • Line 44: warning: exported function LogCustom should have comment or be unexported (golint)
    • hermes/lib/persistence/badger_provider.go
    • Line 17: warning: exported const PacketReserved should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type BadgerProvider should have comment or be unexported (golint)
    • Line 24: warning: exported function NewBadgerProvider should have comment or be unexported (golint)
    • Line 38: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 53: warning: exported method BadgerProvider.SaveForOfflineDelivery should have comment or be unexported (golint)
    • Line 70: warning: exported method BadgerProvider.GetMissedMessages should have comment or be unexported (golint)
    • Line 107: warning: exported method BadgerProvider.ReservePacketID should have comment or be unexported (golint)
    • Line 114: warning: exported method BadgerProvider.FreePacketID should have comment or be unexported (golint)
    • Line 121: warning: exported method BadgerProvider.CheckForPacketIdReuse should have comment or be unexported (golint)
    • hermes/lib/utils/filters.go
    • Line 8: warning: exported function GetTopicInfo should have comment or be unexported (golint)
    • Line 14: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 22: warning: exported function TopicMatches should have comment or be unexported (golint)
    • hermes/lib/mqtt/server_context.go
    • Line 50: warning: exported method ServerContext.AddClient should have comment or be unexported (golint)
    • Line 87: warning: exported method ServerContext.Disconnect should have comment or be unexported (golint)
    • Line 115: warning: should omit 2nd value from range; this loop is equivalent to `for topicFilter := range ...` (golint)
    • Line 162: warning: exported method ServerContext.Subscribe should have comment or be unexported (golint)
    • Line 197: warning: exported method ServerContext.Unsubscribe should have comment or be unexported (golint)
    • Line 213: warning: exported method ServerContext.ReservePacketID should have comment or be unexported (golint)
    • Line 221: warning: exported method ServerContext.FreePacketID should have comment or be unexported (golint)
    • hermes/lib/auth/provider.go
    • Line 8: warning: exported type AuthorisationProvider should have comment or be unexported (golint)
    • Line 12: warning: exported function FetchProviderFromConfig should have comment or be unexported (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!


misspell94%

Misspell Finds commonly misspelled English words