Preparing report...

Report for github.com/JammyT/client_golang

A+    Excellent!    Found 13 issues across 70 files

Tweet

gofmt97%

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!


gocyclo87%

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.

    • client_golang/prometheus/registry.go
    • Line 581: warning: cyclomatic complexity 27 of function processMetric() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 27 of function (*Registry).Gather() is high (> 15) (gocyclo)
    • Line 829: warning: cyclomatic complexity 20 of function checkMetricConsistency() is high (> 15) (gocyclo)
    • Line 264: warning: cyclomatic complexity 17 of function (*Registry).Register() is high (> 15) (gocyclo)

golint97%

Golint is a linter for Go source code.

    • client_golang/api/prometheus/v1/api.go
    • Line 159: warning: comment on exported const AlertStateFiring should be of the form "AlertStateFiring ..." (golint)
    • Line 161: warning: exported const AlertStateInactive should have comment (or a comment on this block) or be unexported (golint)
    • Line 164: warning: comment on exported const ErrBadData should be of the form "ErrBadData ..." (golint)
    • Line 173: warning: comment on exported const HealthGood should be of the form "HealthGood ..." (golint)
    • Line 178: warning: comment on exported const RuleTypeRecording should be of the form "RuleTypeRecording ..." (golint)
    • Line 182: warning: comment on exported const RuleHealthGood should be of the form "RuleHealthGood ..." (golint)
    • Line 187: warning: comment on exported const MetricTypeCounter should be of the form "MetricTypeCounter ..." (golint)
    • Line 294: warning: comment on exported type Rules should be of the form "Rules ..." (with optional leading article) (golint)
    • Line 377: warning: exported method RuleGroup.UnmarshalJSON should have comment or be unexported (golint)
    • Line 410: warning: exported method AlertingRule.UnmarshalJSON should have comment or be unexported (golint)
    • Line 449: warning: exported method RecordingRule.UnmarshalJSON 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!