Preparing report...

Report for github.com/tidwall/gjson

(v1.17.0)

A    Great!    Found 2 issues across 2 files

Tweet

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!


gofmt100%

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

No problems detected. Good job!


gocyclo0%

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.

    • gjson.go
    • Line 1403: warning: cyclomatic complexity 85 of function parseArray() is high (> 15) (gocyclo)
    • Line 1091: warning: cyclomatic complexity 48 of function parseObject() is high (> 15) (gocyclo)
    • Line 1302: warning: cyclomatic complexity 37 of function queryMatches() is high (> 15) (gocyclo)
    • Line 2010: warning: cyclomatic complexity 36 of function Get() is high (> 15) (gocyclo)
    • Line 850: warning: cyclomatic complexity 36 of function parseQuery() is high (> 15) (gocyclo)
    • Line 336: warning: cyclomatic complexity 34 of function (Result).arrayOrMap() is high (> 15) (gocyclo)
    • Line 2526: warning: cyclomatic complexity 30 of function validnumber() is high (> 15) (gocyclo)
    • Line 1712: warning: cyclomatic complexity 27 of function splitPossiblePipe() is high (> 15) (gocyclo)
    • Line 3343: warning: cyclomatic complexity 24 of function (Result).Path() is high (> 15) (gocyclo)
    • Line 1820: warning: cyclomatic complexity 22 of function parseSubSelectors() is high (> 15) (gocyclo)
    • Line 767: warning: cyclomatic complexity 20 of function parseArrayPath() is high (> 15) (gocyclo)
    • Line 2256: warning: cyclomatic complexity 20 of function parseAny() is high (> 15) (gocyclo)
    • Line 227: warning: cyclomatic complexity 20 of function (Result).ForEach() is high (> 15) (gocyclo)
    • Line 975: warning: cyclomatic complexity 19 of function parseObjectPath() is high (> 15) (gocyclo)
    • Line 2134: warning: cyclomatic complexity 19 of function unescape() is high (> 15) (gocyclo)
    • Line 517: warning: cyclomatic complexity 18 of function squash() is high (> 15) (gocyclo)
    • Line 1922: warning: cyclomatic complexity 17 of function AppendJSONString() is high (> 15) (gocyclo)
    • Line 2216: warning: cyclomatic complexity 17 of function stringLessInsensitive() is high (> 15) (gocyclo)
    • Line 3252: warning: cyclomatic complexity 17 of function revSquash() is high (> 15) (gocyclo)
    • Line 2494: warning: cyclomatic complexity 16 of function validstring() is high (> 15) (gocyclo)
    • gjson_test.go
    • Line 1796: warning: cyclomatic complexity 21 of function TestParseQuery() 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!


misspell50%

Misspell Finds commonly misspelled English words

    • gjson.go
    • Line 1255: warning: "arbritary" is a misspelling of "arbitrary" (misspell)