Preparing report...

Report for github.com/tdewolff/parse

(v1.1.0)

A+    Excellent!    Found 12 issues across 31 files

Tweet

gofmt87%

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!


gocyclo74%

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.

    • css/parse.go
    • Line 192: warning: cyclomatic complexity 34 of function (*Parser).parseAtRule() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 23 of function (*Parser).parseQualifiedRule() is high (> 15) (gocyclo)
    • Line 333: warning: cyclomatic complexity 22 of function (*Parser).parseDeclaration() is high (> 15) (gocyclo)
    • common.go
    • Line 15: warning: cyclomatic complexity 32 of function Number() is high (> 15) (gocyclo)
    • Line 120: warning: cyclomatic complexity 27 of function Float() is high (> 15) (gocyclo)
    • Line 234: warning: cyclomatic complexity 23 of function QuoteEntity() is high (> 15) (gocyclo)
    • Line 189: warning: cyclomatic complexity 17 of function DataURI() is high (> 15) (gocyclo)
    • json/parse.go
    • Line 129: warning: cyclomatic complexity 25 of function (*Parser).Next() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 23 of function (*Parser).consumeNumberToken() is high (> 15) (gocyclo)
    • html/util.go
    • Line 55: warning: cyclomatic complexity 22 of function EscapeAttrVal() is high (> 15) (gocyclo)
    • xml/lex.go
    • Line 238: warning: cyclomatic complexity 46 of function (*Lexer).shiftAttribute() is high (> 15) (gocyclo)
    • Line 91: warning: cyclomatic complexity 20 of function (*Lexer).Next() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 16 of function (*Lexer).shiftStartTag() is high (> 15) (gocyclo)
    • css/lex.go
    • Line 156: warning: cyclomatic complexity 38 of function (*Lexer).Next() is high (> 15) (gocyclo)
    • Line 57: warning: cyclomatic complexity 35 of function (TokenType).String() is high (> 15) (gocyclo)
    • Line 387: warning: cyclomatic complexity 24 of function (*Lexer).consumeHashToken() is high (> 15) (gocyclo)
    • Line 350: warning: cyclomatic complexity 22 of function (*Lexer).consumeIdentToken() is high (> 15) (gocyclo)
    • Line 413: warning: cyclomatic complexity 16 of function (*Lexer).consumeNumberToken() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 16 of function (*Lexer).consumeUnicodeRangeToken() is high (> 15) (gocyclo)
    • html/lex.go
    • Line 84: warning: cyclomatic complexity 35 of function (*Lexer).Next() is high (> 15) (gocyclo)
    • Line 160: warning: cyclomatic complexity 33 of function (*Lexer).shiftRawText() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 26 of function (*Lexer).shiftAttribute() is high (> 15) (gocyclo)
    • Line 301: warning: cyclomatic complexity 20 of function (*Lexer).shiftStartTag() is high (> 15) (gocyclo)
    • js/lex.go
    • Line 93: warning: cyclomatic complexity 34 of function (*Lexer).Next() is high (> 15) (gocyclo)
    • Line 370: warning: cyclomatic complexity 26 of function (*Lexer).consumeNumericToken() is high (> 15) (gocyclo)
    • Line 311: warning: cyclomatic complexity 26 of function (*Lexer).consumeLongPunctuatorToken() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 23 of function (*Lexer).consumeIdentifierToken() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 23 of function (*Lexer).consumeRegexpToken() is high (> 15) (gocyclo)
    • Line 274: warning: cyclomatic complexity 16 of function (*Lexer).consumeCommentToken() 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!


misspell96%

Misspell Finds commonly misspelled English words