Preparing report...

Report for github.com/mattermost/logr

A+    Excellent!    Found 7 issues across 35 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.


golint82%

Golint is a linter for Go source code.

    • logr/test/metrics.go
    • Line 9: warning: exported type TestMetrics should have comment or be unexported (golint)
    • Line 17: warning: exported type TestMetricsCollector should have comment or be unexported (golint)
    • Line 25: warning: exported function NewTestMetricsCollector should have comment or be unexported (golint)
    • Line 35: warning: exported method TestMetricsCollector.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method TestMetricsCollector.QueueSizeGauge should have comment or be unexported (golint)
    • Line 54: warning: exported method TestMetricsCollector.LoggedCounter should have comment or be unexported (golint)
    • Line 63: warning: exported method TestMetricsCollector.ErrorCounter should have comment or be unexported (golint)
    • Line 72: warning: exported method TestMetricsCollector.DroppedCounter should have comment or be unexported (golint)
    • Line 81: warning: exported method TestMetricsCollector.BlockedCounter should have comment or be unexported (golint)
    • Line 90: warning: exported type TestGauge should have comment or be unexported (golint)
    • Line 105: warning: exported method TestGauge.Set should have comment or be unexported (golint)
    • Line 111: warning: exported method TestGauge.Add should have comment or be unexported (golint)
    • Line 117: warning: exported method TestGauge.Sub should have comment or be unexported (golint)
    • Line 123: warning: exported type TestCounter should have comment or be unexported (golint)
    • Line 138: warning: exported method TestCounter.Inc should have comment or be unexported (golint)
    • Line 144: warning: exported method TestCounter.Add should have comment or be unexported (golint)
    • logr/config.go
    • Line 9: warning: exported function ConfigLogger should have comment or be unexported (golint)
    • logr/logr.go
    • Line 414: warning: comment on exported method Logr.FlushWithTimeout should be of the form "FlushWithTimeout ..." (golint)
    • Line 460: warning: comment on exported method Logr.ShutdownWithTimeout should be of the form "ShutdownWithTimeout ..." (golint)
    • logr/metrics.go
    • Line 10: warning: exported const DefMetricsUpdateFreqMillis should have comment (or a comment on this block) or be unexported (golint)
    • logr/target.go
    • Line 86: warning: exported method Basic.SetName should have comment or be unexported (golint)
    • Line 139: warning: comment on exported method Basic.EnableMetrics should be of the form "EnableMetrics ..." (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!