Preparing report...

Report for github.com/dunglas/mercure

(v0.12.2)

A+    Excellent!    Found 9 issues across 38 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!


gocyclo97%

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.

    • config.go
    • Line 131: warning: cyclomatic complexity 27 of function NewHubFromViper() is high (> 15) (gocyclo)

golint78%

Golint is a linter for Go source code.

    • transport.go
    • Line 21: warning: exported function RegisterTransportFactory should have comment or be unexported (golint)
    • Line 27: warning: exported function NewTransport should have comment or be unexported (golint)
    • update.go
    • Line 26: warning: exported method Update.MarshalLogObject should have comment or be unexported (golint)
    • common/version.go
    • Line 12: warning: exported type AppVersionInfo should have comment or be unexported (golint)
    • Line 21: warning: exported var AppVersion should have comment or be unexported (golint)
    • Line 30: warning: exported method AppVersionInfo.Shortline should have comment or be unexported (golint)
    • Line 44: warning: exported method AppVersionInfo.ChangelogURL should have comment or be unexported (golint)
    • Line 54: warning: exported method AppVersionInfo.NewMetricsCollector should have comment or be unexported (golint)
    • bolt_transport.go
    • Line 18: warning: exported const BoltDefaultCleanupFrequency should have comment or be unexported (golint)
    • hub.go
    • Line 36: warning: exported function WithUI should have comment or be unexported (golint)
    • metrics.go
    • Line 10: warning: exported type Metrics should have comment or be unexported (golint)
    • Line 19: warning: exported type NopMetrics should have comment or be unexported (golint)
    • Line 21: warning: exported method NopMetrics.SubscriberConnected should have comment or be unexported (golint)
    • Line 22: warning: exported method NopMetrics.SubscriberDisconnected should have comment or be unexported (golint)
    • Line 23: warning: exported method NopMetrics.UpdatePublished should have comment or be unexported (golint)
    • Line 83: warning: exported method PrometheusMetrics.SubscriberConnected should have comment or be unexported (golint)
    • Line 88: warning: exported method PrometheusMetrics.SubscriberDisconnected should have comment or be unexported (golint)
    • Line 92: warning: exported method PrometheusMetrics.UpdatePublished should have comment or be unexported (golint)
    • subscriber.go
    • Line 226: warning: exported method Subscriber.MarshalLogObject should have comment or be unexported (golint)
    • subscription.go
    • Line 39: warning: exported method Hub.SubscriptionsHandler should have comment or be unexported (golint)
    • Line 69: warning: exported method Hub.SubscriptionHandler 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!