Preparing report...

Report for github.com/GoogleCloudPlatform/prometheus-engine

(v0.1.2)

A+    Excellent!    Found 19 issues across 75 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!


golint88%

Golint is a linter for Go source code.

    • pkg/export/export.go
    • Line 648: warning: exported method Matchers.Set should have comment or be unexported (golint)
    • Line 657: warning: exported method Matchers.IsCumulative should have comment or be unexported (golint)
    • Line 661: warning: exported method Matchers.Matches should have comment or be unexported (golint)
    • pkg/ui/ui.go
    • Line 33: warning: exported function Handler should have comment or be unexported (golint)
    • pkg/operator/certificate.go
    • Line 115: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • pkg/operator/operator.go
    • Line 52: warning: comment on exported const NameOperator should be of the form "NameOperator ..." (golint)
    • Line 64: warning: comment on exported const LabelAppName should be of the form "LabelAppName ..." (golint)
    • Line 66: warning: comment on exported const AnnotationMetricName should be of the form "AnnotationMetricName ..." (golint)
    • Line 69: warning: comment on exported const ImageCollector should be of the form "ImageCollector ..." (golint)
    • Line 72: warning: exported const ImageConfigReloader should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: comment on exported const KubernetesAppName should be of the form "KubernetesAppName ..." (golint)
    • pkg/operator/apis/monitoring/v1alpha1/types.go
    • Line 146: warning: comment on exported type TLSConfig should be of the form "TLSConfig ..." (with optional leading article) (golint)
    • Line 192: warning: exported method PodMonitoring.ValidateCreate should have comment or be unexported (golint)
    • Line 200: warning: exported method PodMonitoring.ValidateUpdate should have comment or be unexported (golint)
    • Line 205: warning: exported method PodMonitoring.ValidateDelete should have comment or be unexported (golint)
    • Line 210: warning: exported method PodMonitoring.ScrapeConfigs should have comment or be unexported (golint)
    • Line 221: warning: comment on exported const EnvVarNodeName should be of the form "EnvVarNodeName ..." (golint)
    • Line 373: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)

gocyclo90%

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.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell92%

Misspell Finds commonly misspelled English words

    • pkg/export/export.go
    • Line 266: warning: "overriden" is a misspelling of "overridden" (misspell)
    • Line 282: warning: "overriden" is a misspelling of "overridden" (misspell)
    • Line 283: warning: "overriden" is a misspelling of "overridden" (misspell)