Preparing report...

Report for github.com/mantyr/rjson

A+    Excellent!    Found 8 issues across 15 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo66%

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.

    • rjson/encode.go
    • Line 276: warning: cyclomatic complexity 48 of function (*encodeState).reflectValueQuoted() is high (> 15) (gocyclo)
    • Line 597: warning: cyclomatic complexity 21 of function typeFields() is high (> 15) (gocyclo)
    • Line 494: warning: cyclomatic complexity 16 of function (*encodeState).string() is high (> 15) (gocyclo)
    • rjson/decode.go
    • Line 629: warning: cyclomatic complexity 41 of function (*decodeState).literalStore() is high (> 15) (gocyclo)
    • Line 430: warning: cyclomatic complexity 35 of function (*decodeState).object() is high (> 15) (gocyclo)
    • Line 992: warning: cyclomatic complexity 33 of function unquoteBytes() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 22 of function (*decodeState).array() is high (> 15) (gocyclo)
    • Line 295: warning: cyclomatic complexity 18 of function (*decodeState).indirect() is high (> 15) (gocyclo)
    • Line 794: warning: cyclomatic complexity 16 of function (*decodeState).numberStore() is high (> 15) (gocyclo)
    • rjson/indent.go
    • Line 86: warning: cyclomatic complexity 25 of function Indent() is high (> 15) (gocyclo)
    • Line 20: warning: cyclomatic complexity 16 of function compact() is high (> 15) (gocyclo)

golint80%

Golint is a linter for Go source code.

    • rjson/decode.go
    • Line 162: warning: exported method Number.MarshalJSON should have comment or be unexported (golint)
    • rjson/encode.go
    • Line 199: warning: exported type UnsupportedValueError should have comment or be unexported (golint)
    • Line 208: warning: exported type InvalidUTF8Error should have comment or be unexported (golint)
    • Line 216: warning: exported type MarshalerError should have comment or be unexported (golint)
    • rjson/scanner_test.go
    • Line 115: warning: don't use underscores in Go names; var b_compact should be bCompact (golint)
    • Line 134: warning: don't use underscores in Go names; var b_indent should be bIndent (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign86%

IneffAssign detects ineffectual assignments in Go code.

    • rjson/cmd/rjson/main.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/mantyr/rjson (invalid package name: "") (ineffassign)
    • rjson/example_test.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/mantyr/rjson (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!