Preparing report...

Report for github.com/intelsdi-x/snap-plugin-lib-go

A+    Excellent!    Found 15 issues across 41 files

Tweet

gofmt92%

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!


golint70%

Golint is a linter for Go source code.

    • snap-plugin-lib-go/v1/plugin/config_policy.go
    • Line 28: warning: exported type ConfigPolicy should have comment or be unexported (golint)
    • Line 35: warning: exported function NewConfigPolicy should have comment or be unexported (golint)
    • Line 44: warning: comment on exported method ConfigPolicy.AddNewIntRule should be of the form "AddNewIntRule ..." (golint)
    • snap-plugin-lib-go/examples/snap-plugin-collector-rand-streaming/rand/rand.go
    • Line 60: warning: comment on exported type RandCollector should be of the form "RandCollector ..." (with optional leading article) (golint)
    • Line 74: warning: don't use underscores in Go names; method parameter metrics_in should be metricsIn (golint)
    • Line 75: warning: don't use underscores in Go names; method parameter metrics_out should be metricsOut (golint)
    • Line 133: warning: comment on exported method RandCollector.GetMetricTypes should be of the form "GetMetricTypes ..." (golint)
    • Line 156: warning: comment on exported method RandCollector.GetConfigPolicy should be of the form "GetConfigPolicy ..." (golint)
    • snap-plugin-lib-go/v1/plugin/meta.go
    • Line 30: warning: exported const LRURouter should have comment (or a comment on this block) or be unexported (golint)
    • Line 112: warning: exported function GRPCServerOptions should have comment or be unexported (golint)
    • snap-plugin-lib-go/v1/plugin/metric.go
    • Line 226: warning: exported type Namespace should have comment or be unexported (golint)
    • Line 255: warning: comment on exported function NewNamespace should be of the form "NewNamespace ..." (golint)
    • Line 296: warning: exported method Namespace.Element should have comment or be unexported (golint)
    • Line 342: warning: comment on exported type NamespaceElement should be of the form "NamespaceElement ..." (with optional leading article) (golint)
    • snap-plugin-lib-go/v1/plugin/plugin.go
    • Line 105: warning: exported var App should have comment or be unexported (golint)
    • Line 107: warning: comment on exported type StreamCollector should be of the form "StreamCollector ..." (with optional leading article) (golint)
    • Line 146: warning: comment on exported type OSInputOutput should be of the form "OSInputOutput ..." (with optional leading article) (golint)
    • snap-plugin-lib-go/examples/snap-plugin-collector-rand/rand/rand.go
    • Line 75: warning: comment on exported type RandCollector should be of the form "RandCollector ..." (with optional leading article) (golint)
    • Line 79: warning: comment on exported method RandCollector.CollectMetrics should be of the form "CollectMetrics ..." (golint)
    • Line 132: warning: comment on exported method RandCollector.GetMetricTypes should be of the form "GetMetricTypes ..." (golint)
    • Line 167: warning: comment on exported method RandCollector.GetConfigPolicy should be of the form "GetConfigPolicy ..." (golint)

gocyclo95%

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!