Preparing report...

Report for github.com/fgeth/fasthttp

A+    Excellent!    Found 24 issues across 109 files

Tweet

gofmt98%

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!


golint94%

Golint is a linter for Go source code.

    • fasthttp/uri.go
    • Line 263: warning: exported var ErrorInvalidURI should have comment or be unexported (golint)
    • Line 311: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 415: warning: exported type EscapeError should have comment or be unexported (golint)
    • Line 421: warning: exported type InvalidHostError should have comment or be unexported (golint)
    • fasthttp/client.go
    • Line 975: warning: comment on exported var ErrHostClientRedirectToDifferentScheme should be of the form "ErrHostClientRedirectToDifferentScheme ..." (golint)
    • fasthttp/http.go
    • Line 461: warning: exported method RequestCtx.RequestBodyStream should have comment or be unexported (golint)
    • Line 1136: warning: comment on exported method Request.ContinueReadBodyStream should be of the form "ContinueReadBodyStream ..." (golint)

gocyclo80%

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.

    • fasthttp/header.go
    • Line 2157: warning: cyclomatic complexity 29 of function (*headerScanner).next() is high (> 15) (gocyclo)
    • Line 2018: warning: cyclomatic complexity 26 of function (*RequestHeader).parseHeaders() is high (> 15) (gocyclo)
    • Line 1938: warning: cyclomatic complexity 24 of function (*ResponseHeader).parseHeaders() is high (> 15) (gocyclo)
    • fasthttp/server_test.go
    • Line 1217: warning: cyclomatic complexity 22 of function TestServerMultipartFormDataRequest() is high (> 15) (gocyclo)
    • Line 661: warning: cyclomatic complexity 18 of function TestServerResponseBodyStream() is high (> 15) (gocyclo)
    • Line 1523: warning: cyclomatic complexity 18 of function TestServerHTTP10ConnectionKeepAlive() is high (> 15) (gocyclo)
    • Line 1912: warning: cyclomatic complexity 16 of function TestCompressHandler() is high (> 15) (gocyclo)
    • fasthttp/client_test.go
    • Line 1183: warning: cyclomatic complexity 18 of function TestHostClientPendingRequests() is high (> 15) (gocyclo)
    • Line 1480: warning: cyclomatic complexity 18 of function TestClientFollowRedirects() is high (> 15) (gocyclo)
    • Line 2720: warning: cyclomatic complexity 17 of function TestHostClientMaxConnWaitTimeoutWithEarlierDeadline() is high (> 15) (gocyclo)
    • fasthttp/fs.go
    • Line 745: warning: cyclomatic complexity 35 of function (*fsHandler).handleRequest() is high (> 15) (gocyclo)
    • fasthttp/client.go
    • Line 2673: warning: cyclomatic complexity 26 of function (*pipelineConnClient).writer() is high (> 15) (gocyclo)
    • Line 1350: warning: cyclomatic complexity 24 of function (*HostClient).doNonNilReqResp() is high (> 15) (gocyclo)
    • Line 1510: warning: cyclomatic complexity 17 of function (*HostClient).acquireConn() is high (> 15) (gocyclo)
    • fasthttp/header_test.go
    • Line 1533: warning: cyclomatic complexity 23 of function TestResponseHeaderCookie() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 19 of function TestRequestRawHeaders() is high (> 15) (gocyclo)
    • Line 1382: warning: cyclomatic complexity 16 of function TestResponseHeaderVisitAll() is high (> 15) (gocyclo)
    • Line 1436: warning: cyclomatic complexity 16 of function TestRequestHeaderVisitAll() is high (> 15) (gocyclo)
    • fasthttp/http.go
    • Line 1708: warning: cyclomatic complexity 16 of function (*Response).writeBodyStream() is high (> 15) (gocyclo)
    • Line 1322: warning: cyclomatic complexity 16 of function (*Request).Write() is high (> 15) (gocyclo)
    • fasthttp/args_test.go
    • Line 38: warning: cyclomatic complexity 21 of function TestArgsAdd() is high (> 15) (gocyclo)
    • Line 416: warning: cyclomatic complexity 17 of function TestArgsSetGetDel() is high (> 15) (gocyclo)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!