Preparing report...

Report for github.com/go-ap/jsonld

A+    Excellent!    Found 5 issues across 13 files

Tweet

gofmt92%

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!


gocyclo76%

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.

    • jsonld/decode.go
    • Line 805: warning: cyclomatic complexity 58 of function (*decodeState).literalStore() is high (> 15) (gocyclo)
    • Line 576: warning: cyclomatic complexity 46 of function (*decodeState).object() is high (> 15) (gocyclo)
    • Line 1141: warning: cyclomatic complexity 30 of function unquoteBytes() is high (> 15) (gocyclo)
    • Line 188: warning: cyclomatic complexity 27 of function isValidNumber() is high (> 15) (gocyclo)
    • Line 467: warning: cyclomatic complexity 23 of function (*decodeState).array() is high (> 15) (gocyclo)
    • Line 422: warning: cyclomatic complexity 20 of function (*decodeState).indirect() is high (> 15) (gocyclo)
    • jsonld/encode.go
    • Line 1148: warning: cyclomatic complexity 32 of function typeFields() is high (> 15) (gocyclo)
    • Line 443: warning: cyclomatic complexity 22 of function newTypeEncoder() is high (> 15) (gocyclo)
    • Line 953: warning: cyclomatic complexity 19 of function (*encodeState).string() is high (> 15) (gocyclo)
    • Line 1030: warning: cyclomatic complexity 19 of function (*encodeState).stringBytes() is high (> 15) (gocyclo)
    • Line 598: warning: cyclomatic complexity 17 of function (floatEncoder).encode() is high (> 15) (gocyclo)

golint84%

Golint is a linter for Go source code.

    • jsonld/encode.go
    • Line 31: warning: exported var Ctxt should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function WithContext should be of the form "WithContext ..." (golint)
    • Line 249: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 286: warning: exported type UnsupportedValueError should have comment or be unexported (golint)
    • Line 295: warning: comment on exported type InvalidUTF8Error should be of the form "InvalidUTF8Error ..." (with optional leading article) (golint)
    • Line 309: warning: exported type MarshalerError should have comment or be unexported (golint)
    • jsonld/context.go
    • Line 65: warning: comment on exported type LangRef should be of the form "LangRef ..." (with optional leading article) (golint)
    • Line 75: warning: comment on exported type Nillable should be of the form "Nillable ..." (with optional leading article) (golint)
    • Line 80: warning: exported type IRILike should have comment or be unexported (golint)
    • Line 86: warning: exported method IRI.IsCompact should have comment or be unexported (golint)
    • Line 89: warning: exported method IRI.IsAbsolute should have comment or be unexported (golint)
    • Line 92: warning: exported method IRI.IsRelative should have comment or be unexported (golint)
    • Line 112: warning: exported const NilTerm should have comment or be unexported (golint)
    • Line 113: warning: exported const NilLangRef should have comment or be unexported (golint)
    • Line 115: warning: exported type ContextObject should have comment or be unexported (golint)
    • Line 132: warning: exported function GetContext should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!