Preparing report...

Report for github.com/bookingcom/carbonapi

(v0.3.0)

A+    Excellent!    Found 46 issues across 214 files

Tweet

gofmt91%

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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo89%

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.

    • tests/helper.go
    • Line 241: warning: cyclomatic complexity 22 of function TestMultiReturnEvalExpr() is high (> 15) (gocyclo)
    • expr/functions/cairo/png/cairo.go
    • Line 1034: warning: cyclomatic complexity 67 of function drawGraph() is high (> 15) (gocyclo)
    • Line 1313: warning: cyclomatic complexity 65 of function setupTwoYAxes() is high (> 15) (gocyclo)
    • Line 2251: warning: cyclomatic complexity 40 of function drawLines() is high (> 15) (gocyclo)
    • Line 1640: warning: cyclomatic complexity 38 of function setupYAxis() is high (> 15) (gocyclo)
    • Line 673: warning: cyclomatic complexity 34 of function EvalExprGraph() is high (> 15) (gocyclo)
    • Line 2049: warning: cyclomatic complexity 20 of function drawGridLines() is high (> 15) (gocyclo)
    • Line 2448: warning: cyclomatic complexity 18 of function drawLegend() is high (> 15) (gocyclo)
    • pkg/parser/parser.go
    • Line 568: warning: cyclomatic complexity 22 of function parseName() is high (> 15) (gocyclo)
    • Line 439: warning: cyclomatic complexity 22 of function parseArgList() is high (> 15) (gocyclo)
    • Line 119: warning: cyclomatic complexity 20 of function (*expr).Metrics() is high (> 15) (gocyclo)
    • Line 422: warning: cyclomatic complexity 19 of function IsNameChar() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 17 of function parseExprWithoutPipe() is high (> 15) (gocyclo)
    • app/carbonapi/http_handlers.go
    • Line 147: warning: cyclomatic complexity 25 of function (*App).renderHandler() is high (> 15) (gocyclo)
    • Line 791: warning: cyclomatic complexity 24 of function (*App).findHandler() is high (> 15) (gocyclo)
    • Line 1156: warning: cyclomatic complexity 20 of function (*App).functionsHandler() is high (> 15) (gocyclo)
    • Line 72: warning: cyclomatic complexity 20 of function writeResponse() is high (> 15) (gocyclo)
    • date/date.go
    • Line 52: warning: cyclomatic complexity 20 of function DateParamToEpoch() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words

    • expr/functions/moving/function.go
    • Line 137: warning: "preceeding" is a misspelling of "preceding" (misspell)
    • Line 170: warning: "preceeding" is a misspelling of "preceding" (misspell)
    • Line 203: warning: "preceeding" is a misspelling of "preceding" (misspell)
    • Line 236: warning: "preceeding" is a misspelling of "preceding" (misspell)
    • expr/functions/cairo/cairo_test.go
    • Line 37: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 39: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 43: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 45: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 49: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 51: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 62: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 64: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 72: warning: "fourty" is a misspelling of "forty" (misspell)
    • Line 74: warning: "fourty" is a misspelling of "forty" (misspell)