Preparing report...

Report for github.com/tdewolff/minify

(v1.1.0)

A+    Excellent!    Found 11 issues across 26 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!


gocyclo73%

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.

    • common.go
    • Line 81: warning: cyclomatic complexity 38 of function Number() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 23 of function DataURI() is high (> 15) (gocyclo)
    • Line 215: warning: cyclomatic complexity 20 of function lenInt64() is high (> 15) (gocyclo)
    • json/json.go
    • Line 18: warning: cyclomatic complexity 18 of function Minify() is high (> 15) (gocyclo)
    • html/html.go
    • Line 27: warning: cyclomatic complexity 195 of function Minify() is high (> 15) (gocyclo)
    • css/css.go
    • Line 157: warning: cyclomatic complexity 94 of function (*cssMinifier).minifyDeclaration() is high (> 15) (gocyclo)
    • Line 297: warning: cyclomatic complexity 48 of function (*cssMinifier).minifyFunction() is high (> 15) (gocyclo)
    • Line 419: warning: cyclomatic complexity 45 of function (*cssMinifier).shortenToken() is high (> 15) (gocyclo)
    • Line 55: warning: cyclomatic complexity 25 of function (*cssMinifier).minifyGrammar() is high (> 15) (gocyclo)
    • svg/svg.go
    • Line 30: warning: cyclomatic complexity 92 of function Minify() is high (> 15) (gocyclo)
    • Line 285: warning: cyclomatic complexity 22 of function shortenPathData() is high (> 15) (gocyclo)
    • xml/xml.go
    • Line 29: warning: cyclomatic complexity 56 of function Minify() is high (> 15) (gocyclo)
    • js/js.go
    • Line 17: warning: cyclomatic complexity 41 of function Minify() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell84%

Misspell Finds commonly misspelled English words

    • xml/buffer_test.go
    • Line 22: warning: "positon" is a misspelling of "position" (misspell)
    • Line 25: warning: "nineth" is a misspelling of "ninth" (misspell)
    • Line 26: warning: "positon" is a misspelling of "position" (misspell)
    • Line 36: warning: "positon" is a misspelling of "position" (misspell)
    • html/buffer_test.go
    • Line 22: warning: "positon" is a misspelling of "position" (misspell)
    • Line 25: warning: "nineth" is a misspelling of "ninth" (misspell)
    • Line 26: warning: "positon" is a misspelling of "position" (misspell)
    • Line 36: warning: "positon" is a misspelling of "position" (misspell)
    • svg/buffer_test.go
    • Line 23: warning: "positon" is a misspelling of "position" (misspell)
    • Line 26: warning: "nineth" is a misspelling of "ninth" (misspell)
    • Line 27: warning: "positon" is a misspelling of "position" (misspell)
    • Line 37: warning: "positon" is a misspelling of "position" (misspell)