Preparing report...

Report for github.com/dcos/dcos-diagnostics

A+    Excellent!    Found 18 issues across 76 files

Tweet

gofmt96%

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!


golint84%

Golint is a linter for Go source code.

    • dcos-diagnostics/mocks/prometheus.go
    • Line 8: warning: exported type MockObserver should have comment or be unexported (golint)
    • Line 12: warning: exported method MockObserver.Observe should have comment or be unexported (golint)
    • Line 16: warning: exported type MockHistogram should have comment or be unexported (golint)
    • Line 20: warning: exported method MockHistogram.GetMetricWith should have comment or be unexported (golint)
    • Line 25: warning: exported method MockHistogram.GetMetricWithLabelValues should have comment or be unexported (golint)
    • Line 30: warning: exported method MockHistogram.With should have comment or be unexported (golint)
    • Line 35: warning: exported method MockHistogram.WithLabelValues should have comment or be unexported (golint)
    • Line 44: warning: exported method MockHistogram.CurryWith should have comment or be unexported (golint)
    • Line 49: warning: exported method MockHistogram.MustCurryWith should have comment or be unexported (golint)
    • Line 53: warning: exported method MockHistogram.Describe should have comment or be unexported (golint)
    • Line 57: warning: exported method MockHistogram.Collect should have comment or be unexported (golint)
    • dcos-diagnostics/collector/collector.go
    • Line 35: warning: exported function NewCmd should have comment or be unexported (golint)
    • Line 43: warning: exported method Cmd.Name should have comment or be unexported (golint)
    • Line 47: warning: exported method Cmd.Optional should have comment or be unexported (golint)
    • Line 51: warning: exported method Cmd.Collect should have comment or be unexported (golint)
    • Line 65: warning: exported function NewSystemd should have comment or be unexported (golint)
    • Line 74: warning: exported method Systemd.Name should have comment or be unexported (golint)
    • Line 78: warning: exported method Systemd.Optional should have comment or be unexported (golint)
    • Line 82: warning: exported method Systemd.Collect should have comment or be unexported (golint)
    • Line 100: warning: exported function NewEndpoint should have comment or be unexported (golint)
    • Line 109: warning: exported method Endpoint.Name should have comment or be unexported (golint)
    • Line 113: warning: exported method Endpoint.Optional should have comment or be unexported (golint)
    • Line 117: warning: exported method Endpoint.Collect should have comment or be unexported (golint)
    • Line 146: warning: exported type File should have comment or be unexported (golint)
    • Line 152: warning: exported function NewFile should have comment or be unexported (golint)
    • Line 160: warning: exported method File.Name should have comment or be unexported (golint)
    • Line 164: warning: exported method File.Optional should have comment or be unexported (golint)
    • Line 168: warning: exported method File.Collect should have comment or be unexported (golint)
    • dcos-diagnostics/api/rest/bundle_handler.go
    • Line 36: warning: exported type Bundle should have comment or be unexported (golint)
    • Line 46: warning: exported method Bundle.IsFinished should have comment or be unexported (golint)
    • Line 50: warning: exported method Bundle.Failed should have comment or be unexported (golint)
    • Line 56: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • Line 61: warning: exported type Clock should have comment or be unexported (golint)
    • Line 69: warning: exported function NewBundleHandler should have comment or be unexported (golint)
    • Line 102: warning: exported method BundleHandler.Create should have comment or be unexported (golint)
    • Line 226: warning: exported method BundleHandler.Get should have comment or be unexported (golint)
    • Line 245: warning: exported method BundleHandler.GetFile should have comment or be unexported (golint)
    • Line 271: warning: exported method BundleHandler.List should have comment or be unexported (golint)
    • Line 338: warning: exported method BundleHandler.Delete should have comment or be unexported (golint)
    • dcos-diagnostics/api/providers.go
    • Line 52: warning: exported const GoosWindows should have comment (or a comment on this block) or be unexported (golint)
    • Line 161: warning: exported function LoadCollectors should have comment or be unexported (golint)
    • dcos-diagnostics/api/rest/client.go
    • Line 33: warning: exported type DiagnosticsClient should have comment or be unexported (golint)
    • Line 44: warning: exported method DiagnosticsClient.CreateBundle should have comment or be unexported (golint)
    • Line 84: warning: exported method DiagnosticsClient.Status should have comment or be unexported (golint)
    • Line 117: warning: exported method DiagnosticsClient.GetFile should have comment or be unexported (golint)
    • Line 152: warning: exported method DiagnosticsClient.List should have comment or be unexported (golint)
    • Line 185: warning: exported method DiagnosticsClient.Delete should have comment or be unexported (golint)
    • dcos-diagnostics/api/rest/client_errors.go
    • Line 7: warning: exported type DiagnosticsBundleNotFoundError should have comment or be unexported (golint)
    • Line 15: warning: exported type DiagnosticsBundleUnreadableError should have comment or be unexported (golint)
    • Line 23: warning: exported type DiagnosticsBundleAlreadyExists should have comment or be unexported (golint)

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.


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words