Preparing report...

Report for github.com/K-Phoen/grabana

A+    Excellent!    Found 21 issues across 64 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!


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.

    • grabana/decoder/target.go
    • Line 240: warning: cyclomatic complexity 21 of function (StackdriverAlignment).toOption() is high (> 15) (gocyclo)
    • Line 186: warning: cyclomatic complexity 16 of function (StackdriverTarget).aggregation() is high (> 15) (gocyclo)
    • grabana/decoder/graph.go
    • Line 31: warning: cyclomatic complexity 19 of function (DashboardGraph).toOption() is high (> 15) (gocyclo)
    • Line 272: warning: cyclomatic complexity 17 of function (GraphAlert).toOptions() is high (> 15) (gocyclo)

golint67%

Golint is a linter for Go source code.

    • grabana/heatmap/heatmap.go
    • Line 15: warning: comment on exported const TimeSeriesBuckets should be of the form "TimeSeriesBuckets ..." (golint)
    • Line 18: warning: comment on exported const TimeSeries should be of the form "TimeSeries ..." (golint)
    • grabana/decoder/singlestat.go
    • Line 10: warning: exported var ErrInvalidColoringTarget should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrInvalidSparkLineMode should have comment or be unexported (golint)
    • Line 12: warning: exported var ErrInvalidSingleStatValueType should have comment or be unexported (golint)
    • Line 14: warning: exported type DashboardSingleStat should have comment or be unexported (golint)
    • grabana/target/stackdriver/stackdriver.go
    • Line 8: warning: exported const AlignmentStackdriverAuto should have comment or be unexported (golint)
    • Line 9: warning: exported const AlignmentGrafanaAuto should have comment or be unexported (golint)
    • Line 16: warning: exported const AlignNone should have comment or be unexported (golint)
    • Line 17: warning: exported const AlignDelta should have comment or be unexported (golint)
    • Line 18: warning: exported const AlignRate should have comment or be unexported (golint)
    • Line 19: warning: exported const AlignInterpolate should have comment or be unexported (golint)
    • Line 20: warning: exported const AlignNextOlder should have comment or be unexported (golint)
    • Line 21: warning: exported const AlignMin should have comment or be unexported (golint)
    • Line 22: warning: exported const AlignMax should have comment or be unexported (golint)
    • Line 23: warning: exported const AlignMean should have comment or be unexported (golint)
    • Line 24: warning: exported const AlignCount should have comment or be unexported (golint)
    • Line 25: warning: exported const AlignSum should have comment or be unexported (golint)
    • Line 26: warning: exported const AlignStdDev should have comment or be unexported (golint)
    • Line 27: warning: exported const AlignCountTrue should have comment or be unexported (golint)
    • Line 28: warning: exported const AlignCountFalse should have comment or be unexported (golint)
    • Line 29: warning: exported const AlignFractionTrue should have comment or be unexported (golint)
    • Line 30: warning: exported const AlignPercentile99 should have comment or be unexported (golint)
    • Line 31: warning: exported const AlignPercentile95 should have comment or be unexported (golint)
    • Line 32: warning: exported const AlignPercentile50 should have comment or be unexported (golint)
    • Line 33: warning: exported const AlignPercentile05 should have comment or be unexported (golint)
    • Line 34: warning: exported const AlignPercentChange should have comment or be unexported (golint)
    • Line 43: warning: exported const ReduceNone should have comment or be unexported (golint)
    • Line 44: warning: exported const ReduceMean should have comment or be unexported (golint)
    • Line 45: warning: exported const ReduceMin should have comment or be unexported (golint)
    • Line 46: warning: exported const ReduceMax should have comment or be unexported (golint)
    • Line 47: warning: exported const ReduceSum should have comment or be unexported (golint)
    • Line 48: warning: exported const ReduceStdDev should have comment or be unexported (golint)
    • Line 49: warning: exported const ReduceCount should have comment or be unexported (golint)
    • Line 50: warning: exported const ReduceCountTrue should have comment or be unexported (golint)
    • Line 51: warning: exported const ReduceCountFalse should have comment or be unexported (golint)
    • Line 52: warning: exported const ReduceCountFractionTrue should have comment or be unexported (golint)
    • Line 53: warning: exported const ReducePercentile99 should have comment or be unexported (golint)
    • Line 54: warning: exported const ReducePercentile95 should have comment or be unexported (golint)
    • Line 55: warning: exported const ReducePercentile50 should have comment or be unexported (golint)
    • Line 56: warning: exported const ReducePercentile05 should have comment or be unexported (golint)
    • grabana/graph/series/override.go
    • Line 10: warning: comment on exported function Alias should be of the form "Alias ..." (golint)
    • Line 38: warning: exported function Fill should have comment or be unexported (golint)
    • Line 44: warning: exported function LineWidth should have comment or be unexported (golint)
    • grabana/decoder/graph.go
    • Line 13: warning: exported var ErrNoAlertThresholdDefined should have comment or be unexported (golint)
    • Line 14: warning: exported var ErrInvalidAlertValueFunc should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrInvalidLegendAttribute should have comment or be unexported (golint)
    • Line 17: warning: exported type DashboardGraph should have comment or be unexported (golint)
    • Line 90: warning: exported type GraphSeriesOverride should have comment or be unexported (golint)
    • Line 123: warning: exported type GraphVisualization should have comment or be unexported (golint)
    • Line 219: warning: exported type GraphAxis should have comment or be unexported (golint)
    • Line 253: warning: exported type GraphAxes should have comment or be unexported (golint)
    • Line 259: warning: exported type GraphAlert should have comment or be unexported (golint)
    • Line 336: warning: exported type AlertThreshold should have comment or be unexported (golint)
    • Line 364: warning: exported type AlertValue should have comment or be unexported (golint)
    • Line 400: warning: exported type AlertCondition should have comment or be unexported (golint)
    • grabana/decoder/target.go
    • Line 12: warning: exported var ErrTargetNotConfigured should have comment or be unexported (golint)
    • Line 13: warning: exported var ErrInvalidStackdriverType should have comment or be unexported (golint)
    • Line 14: warning: exported var ErrInvalidStackdriverAggregation should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrInvalidStackdriverAlignment should have comment or be unexported (golint)
    • Line 17: warning: exported type Target should have comment or be unexported (golint)
    • Line 24: warning: exported type PrometheusTarget should have comment or be unexported (golint)
    • Line 63: warning: exported type GraphiteTarget should have comment or be unexported (golint)
    • Line 81: warning: exported type InfluxDBTarget should have comment or be unexported (golint)
    • Line 99: warning: exported type StackdriverTarget should have comment or be unexported (golint)
    • Line 112: warning: exported type StackdriverFilters should have comment or be unexported (golint)
    • Line 119: warning: exported type StackdriverAlignment should have comment or be unexported (golint)
    • grabana/target/stackdriver/filters.go
    • Line 3: warning: exported type FilterOption should have comment or be unexported (golint)
    • Line 12: warning: exported function Eq should have comment or be unexported (golint)
    • Line 20: warning: exported function Neq should have comment or be unexported (golint)
    • Line 28: warning: exported function Matches should have comment or be unexported (golint)
    • Line 36: warning: exported function NotMatches should have comment or be unexported (golint)
    • grabana/target/prometheus/prometheus.go
    • Line 3: warning: comment on exported type FormatMode should be of the form "FormatMode ..." (with optional leading article) (golint)
    • Line 10: warning: exported const FormatTable should have comment (or a comment on this block) or be unexported (golint)
    • grabana/decoder/dashboard.go
    • Line 10: warning: exported var ErrPanelNotConfigured should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrInvalidTimezone should have comment or be unexported (golint)
    • Line 13: warning: exported type DashboardModel should have comment or be unexported (golint)
    • Line 101: warning: exported type DashboardPanel should have comment or be unexported (golint)
    • grabana/decoder/heatmap.go
    • Line 10: warning: exported var ErrInvalidDataFormat should have comment or be unexported (golint)
    • Line 12: warning: exported type DashboardHeatmap should have comment or be unexported (golint)
    • Line 27: warning: exported type HeatmapTooltip should have comment or be unexported (golint)
    • grabana/decoder/variables.go
    • Line 14: warning: exported var ErrVariableNotConfigured should have comment or be unexported (golint)
    • Line 16: warning: exported type DashboardVariable should have comment or be unexported (golint)
    • Line 44: warning: exported type VariableInterval should have comment or be unexported (golint)
    • Line 66: warning: exported type VariableCustom should have comment or be unexported (golint)
    • Line 96: warning: exported type VariableConst should have comment or be unexported (golint)
    • Line 118: warning: exported type VariableQuery should have comment or be unexported (golint)
    • Line 158: warning: exported type VariableDatasource 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!