Preparing report...

Report for github.com/mantyr/xmlutils

C    Needs some work    Found 17 issues across 19 files

Tweet

gofmt10%

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!


gocyclo78%

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.

    • xmlutils/read.go
    • Line 310: warning: cyclomatic complexity 96 of function (*Decoder).unmarshal() is high (> 15) (gocyclo)
    • Line 690: warning: cyclomatic complexity 20 of function (*Decoder).unmarshalPath() is high (> 15) (gocyclo)
    • Line 617: warning: cyclomatic complexity 20 of function copyValue() is high (> 15) (gocyclo)
    • Line 247: warning: cyclomatic complexity 17 of function (*Decoder).unmarshalAttr() is high (> 15) (gocyclo)
    • xmlutils/xml.go
    • Line 436: warning: cyclomatic complexity 82 of function (*Decoder).rawToken() is high (> 15) (gocyclo)
    • Line 860: warning: cyclomatic complexity 50 of function (*Decoder).text() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 18 of function (*Decoder).Token() is high (> 15) (gocyclo)
    • Line 1786: warning: cyclomatic complexity 17 of function escapeText() is high (> 15) (gocyclo)
    • Line 732: warning: cyclomatic complexity 16 of function (*Decoder).attrval() is high (> 15) (gocyclo)
    • xmlutils/marshal.go
    • Line 803: warning: cyclomatic complexity 52 of function (*printer).marshalStruct() is high (> 15) (gocyclo)
    • Line 406: warning: cyclomatic complexity 48 of function (*printer).marshalValue() is high (> 15) (gocyclo)
    • Line 551: warning: cyclomatic complexity 26 of function (*printer).marshalAttr() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 17 of function isValidDirective() is high (> 15) (gocyclo)
    • Line 203: warning: cyclomatic complexity 17 of function (*Encoder).EncodeToken() is high (> 15) (gocyclo)
    • xmlutils/typeinfo.go
    • Line 133: warning: cyclomatic complexity 35 of function (*Utils).structFieldInfo() is high (> 15) (gocyclo)
    • Line 62: warning: cyclomatic complexity 21 of function (*Utils).getTypeInfo() is high (> 15) (gocyclo)
    • Line 296: warning: cyclomatic complexity 19 of function addFieldInfo() is high (> 15) (gocyclo)

golint78%

Golint is a linter for Go source code.

    • xmlutils/interface.go
    • Line 7: warning: exported type XMLEncoder should have comment or be unexported (golint)
    • Line 22: warning: exported type XMLDecoder should have comment or be unexported (golint)
    • xmlutils/tag.go
    • Line 8: warning: exported type XMLTag should have comment or be unexported (golint)
    • Line 23: warning: exported type Tag should have comment or be unexported (golint)
    • Line 35: warning: exported method XMLTag.DeleteNSPrefix should have comment or be unexported (golint)
    • Line 59: warning: exported function ParseXMLTag should have comment or be unexported (golint)
    • Line 85: warning: exported function ParseTag 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!