Preparing report...

Report for github.com/wzshiming/requests

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


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.


golint50%

Golint is a linter for Go source code.

    • requests/cache.go
    • Line 16: warning: exported var ErrNotExist should have comment or be unexported (golint)
    • Line 18: warning: exported type Cache should have comment or be unexported (golint)
    • Line 25: warning: exported function FileCacheDir should have comment or be unexported (golint)
    • Line 29: warning: exported function MemoryCache should have comment or be unexported (golint)
    • Line 114: warning: exported function RequestHash should have comment or be unexported (golint)
    • requests/encode.go
    • Line 20: warning: comment on exported function MarshalResponse should be of the form "MarshalResponse ..." (golint)
    • requests/request.go
    • Line 61: warning: exported method Request.SetCharset should have comment or be unexported (golint)
    • Line 66: warning: exported method Request.SetCharsetWithStr should have comment or be unexported (golint)
    • Line 234: warning: comment on exported method Request.AddForms should be of the form "AddForms ..." (golint)
    • Line 414: warning: exported method Request.RawRequest should have comment or be unexported (golint)
    • requests/response.go
    • Line 138: warning: exported method Response.RawResponse should have comment or be unexported (golint)
    • Line 167: warning: exported method Response.MarshalText should have comment or be unexported (golint)
    • Line 171: warning: exported method Response.UnarshalText should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.

    • /home/shawn/go/pkg/mod/golang.org/x/net@v0.0.0-20190607181551-461777fb6f67/html/charset/charset.go
    • Line 20: warning: missing go.sum entry for module providing package golang.org/x/text/encoding (imported by github.com/wzshiming/requests); to add: (ineffassign)
    • Line 21: warning: missing go.sum entry for module providing package golang.org/x/text/encoding/charmap (imported by golang.org/x/net/html/charset); to add: (ineffassign)
    • Line 22: warning: missing go.sum entry for module providing package golang.org/x/text/encoding/htmlindex (imported by golang.org/x/net/html/charset); to add: (ineffassign)
    • Line 23: warning: missing go.sum entry for module providing package golang.org/x/text/transform (imported by github.com/wzshiming/requests); to add: (ineffassign)
    • Line 20: warning: could not import golang.org/x/text/encoding (invalid package name: "") (ineffassign)
    • Line 21: warning: could not import golang.org/x/text/encoding/charmap (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import golang.org/x/text/encoding/htmlindex (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import golang.org/x/text/transform (invalid package name: "") (ineffassign)
    • requests/request.go
    • Line 19: warning: could not import golang.org/x/text/encoding (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import golang.org/x/text/transform (invalid package name: "") (ineffassign)
    • Line 19: warning: could not import golang.org/x/text/encoding (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import golang.org/x/text/transform (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!