Preparing report...

Report for github.com/surrealdb/cork

(v0.0.0-20211208110447-54ccd49930c9)

A+    Excellent!    Found 13 issues across 31 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!


gocyclo74%

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.

    • cork_test.go
    • Line 1399: warning: cyclomatic complexity 42 of function TestInvariants() is high (> 15) (gocyclo)
    • reader_ref.go
    • Line 23: warning: cyclomatic complexity 39 of function (*Reader).DecodeReflect() is high (> 15) (gocyclo)
    • writer_ref.go
    • Line 23: warning: cyclomatic complexity 35 of function (*Writer).EncodeReflect() is high (> 15) (gocyclo)
    • reader_val.go
    • Line 134: warning: cyclomatic complexity 20 of function (*Reader).createArr() is high (> 15) (gocyclo)
    • Line 25: warning: cyclomatic complexity 17 of function (*Reader).DecodeInterface() is high (> 15) (gocyclo)
    • reader.go
    • Line 398: warning: cyclomatic complexity 20 of function (*Reader).DecodeArr() is high (> 15) (gocyclo)
    • writer.go
    • Line 369: warning: cyclomatic complexity 19 of function (*Writer).EncodeArr() is high (> 15) (gocyclo)
    • reader_any.go
    • Line 24: warning: cyclomatic complexity 52 of function (*Reader).DecodeAny() is high (> 15) (gocyclo)
    • writer_any.go
    • Line 23: warning: cyclomatic complexity 52 of function (*Writer).EncodeAny() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • writer_any.go
    • Line 23: warning: exported method Writer.EncodeAny should have comment or be unexported (golint)
    • cache.go
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 106: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • cork_test.go
    • Line 143: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 147: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 155: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 159: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 169: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 173: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 182: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 186: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 208: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 212: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 216: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 224: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 228: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 232: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 249: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 253: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 264: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 288: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 292: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 301: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 363: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 367: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 419: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • doc.go
    • Line 15: warning: package comment should be of the form "Package cork ..." (golint)
    • errors.go
    • Line 19: warning: error var fail should have name of the form errFoo (golint)
    • handle.go
    • Line 17: warning: exported type Handle should have comment or be unexported (golint)
    • writer.go
    • Line 115: warning: comment on exported method Writer.EncodeNil should be of the form "EncodeNil ..." (golint)
    • Line 352: warning: comment on exported method Writer.EncodeTime should be of the form "EncodeTime ..." (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!


misspell96%

Misspell Finds commonly misspelled English words

    • encode.go
    • Line 87: warning: "remaing" is a misspelling of "remaining" (misspell)