Preparing report...

Report for github.com/surrealdb/fibre

(v0.0.0-20211208172721-cc4f2770111e)

A+    Excellent!    Found 10 issues across 29 files

Tweet

gofmt93%

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

    • run.go
    • Line 1: warning: file is not gofmted with -s (gofmt)

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!


gocyclo93%

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.

    • rpc.go
    • Line 233: warning: cyclomatic complexity 65 of function arg() is high (> 15) (gocyclo)
    • socket.go
    • Line 47: warning: cyclomatic complexity 23 of function (*Socket).rpc() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • socket.go
    • Line 174: warning: exported method Socket.Close should have comment or be unexported (golint)
    • Line 178: warning: exported method Socket.Notify should have comment or be unexported (golint)
    • client.go
    • Line 24: warning: comment on exported type Client should be of the form "Client ..." (with optional leading article) (golint)
    • Line 47: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 150: warning: exported method Client.Rpc should have comment or be unexported (golint)
    • context.go
    • Line 61: warning: exported method Context.Context should have comment or be unexported (golint)
    • Line 68: warning: exported method Context.WithContext should have comment or be unexported (golint)
    • Line 80: warning: exported method Context.Uniq should have comment or be unexported (golint)
    • errors.go
    • Line 67: warning: exported method HTTPError.WithMessage should have comment or be unexported (golint)
    • Line 72: warning: exported method HTTPError.WithField should have comment or be unexported (golint)
    • Line 80: warning: exported method HTTPError.WithFields should have comment or be unexported (golint)
    • fibre.go
    • Line 73: warning: exported const HeaderAccept should have comment (or a comment on this block) or be unexported (golint)
    • Line 101: warning: comment on exported const HeaderAccessControlRequestMethod should be of the form "HeaderAccessControlRequestMethod ..." (golint)
    • Line 111: warning: comment on exported const HeaderContentSecurityPolicy should be of the form "HeaderContentSecurityPolicy ..." (golint)
    • middle.go
    • Line 22: warning: exported var MiddlewareSkip should have comment or be unexported (golint)
    • profile.go
    • Line 21: warning: exported method Fibre.Pprof should have comment or be unexported (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