Preparing report...

Report for github.com/soichisumi/go-simple-jsonmarshaler

A+    Excellent!    Found 33 issues across 83 files

Tweet

gofmt93%

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!


golint90%

Golint is a linter for Go source code.

    • go-simple-jsonmarshaler/internal/encoding/gob/codec_test.go
    • Line 957: warning: don't use underscores in Go names; struct field Ignore_d should be IgnoreD (golint)
    • Line 958: warning: don't use underscores in Go names; struct field Ignore_e should be IgnoreE (golint)
    • Line 959: warning: don't use underscores in Go names; struct field Ignore_f should be IgnoreF (golint)
    • Line 960: warning: don't use underscores in Go names; struct field Ignore_g should be IgnoreG (golint)
    • Line 961: warning: don't use underscores in Go names; struct field Ignore_h should be IgnoreH (golint)
    • Line 962: warning: don't use underscores in Go names; struct field Ignore_i should be IgnoreI (golint)
    • Line 963: warning: don't use underscores in Go names; struct field Ignore_m should be IgnoreM (golint)
    • Line 1359: warning: don't use underscores in Go names; struct field I_nil should be INil (golint)

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.

    • go-simple-jsonmarshaler/internal/encoding/xml/xml.go
    • Line 548: warning: cyclomatic complexity 82 of function (*Decoder).rawToken() is high (> 15) (gocyclo)
    • Line 972: warning: cyclomatic complexity 50 of function (*Decoder).text() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 18 of function (*Decoder).Token() is high (> 15) (gocyclo)
    • Line 1898: warning: cyclomatic complexity 17 of function escapeText() is high (> 15) (gocyclo)
    • Line 844: warning: cyclomatic complexity 16 of function (*Decoder).attrval() is high (> 15) (gocyclo)
    • go-simple-jsonmarshaler/internal/encoding/json/decode.go
    • Line 844: warning: cyclomatic complexity 54 of function (*decodeState).literalStore() is high (> 15) (gocyclo)
    • Line 604: warning: cyclomatic complexity 53 of function (*decodeState).object() is high (> 15) (gocyclo)
    • Line 1173: warning: cyclomatic complexity 30 of function unquoteBytes() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 27 of function isValidNumber() is high (> 15) (gocyclo)
    • Line 498: warning: cyclomatic complexity 24 of function (*decodeState).array() is high (> 15) (gocyclo)
    • Line 431: warning: cyclomatic complexity 22 of function indirect() is high (> 15) (gocyclo)
    • go-simple-jsonmarshaler/internal/encoding/json/encode.go
    • Line 1050: warning: cyclomatic complexity 31 of function typeFields() is high (> 15) (gocyclo)
    • Line 390: warning: cyclomatic complexity 22 of function newTypeEncoder() is high (> 15) (gocyclo)
    • Line 939: warning: cyclomatic complexity 19 of function (*encodeState).stringBytes() is high (> 15) (gocyclo)
    • Line 867: warning: cyclomatic complexity 19 of function (*encodeState).string() is high (> 15) (gocyclo)
    • Line 545: warning: cyclomatic complexity 17 of function (floatEncoder).encode() is high (> 15) (gocyclo)
    • go-simple-jsonmarshaler/internal/encoding/xml/read.go
    • Line 308: warning: cyclomatic complexity 92 of function (*Decoder).unmarshal() is high (> 15) (gocyclo)
    • Line 675: warning: cyclomatic complexity 20 of function (*Decoder).unmarshalPath() is high (> 15) (gocyclo)
    • Line 602: warning: cyclomatic complexity 20 of function copyValue() is high (> 15) (gocyclo)
    • Line 246: warning: cyclomatic complexity 17 of function (*Decoder).unmarshalAttr() is high (> 15) (gocyclo)
    • go-simple-jsonmarshaler/internal/encoding/gob/codec_test.go
    • Line 1021: warning: cyclomatic complexity 27 of function TestIndirectSliceMapArray() is high (> 15) (gocyclo)
    • Line 630: warning: cyclomatic complexity 23 of function TestOverflow() is high (> 15) (gocyclo)
    • Line 847: warning: cyclomatic complexity 21 of function TestAutoIndirection() is high (> 15) (gocyclo)
    • Line 342: warning: cyclomatic complexity 19 of function TestScalarDecInstructions() is high (> 15) (gocyclo)
    • Line 1126: warning: cyclomatic complexity 18 of function TestInterface() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 16 of function TestScalarEncInstructions() is high (> 15) (gocyclo)
    • go-simple-jsonmarshaler/internal/encoding/xml/marshal.go
    • Line 799: warning: cyclomatic complexity 52 of function (*printer).marshalStruct() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 48 of function (*printer).marshalValue() is high (> 15) (gocyclo)
    • Line 547: warning: cyclomatic complexity 26 of function (*printer).marshalAttr() is high (> 15) (gocyclo)
    • Line 202: warning: cyclomatic complexity 17 of function (*Encoder).EncodeToken() is high (> 15) (gocyclo)
    • Line 259: warning: cyclomatic complexity 17 of function isValidDirective() is high (> 15) (gocyclo)

ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!