Preparing report...

Report for github.com/cavaliercoder/grab

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


gocyclo92%

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.

    • grab/client.go
    • Line 485: warning: cyclomatic complexity 17 of function (*Client).copyFile() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • grab/grabtest/util.go
    • Line 5: warning: exported function MustHexDecodeString should have comment or be unexported (golint)
    • Line 14: warning: exported function MustHexEncodeString should have comment or be unexported (golint)
    • grab/grabui/console_client.go
    • Line 13: warning: exported type ConsoleClient should have comment or be unexported (golint)
    • Line 20: warning: exported function NewConsoleClient should have comment or be unexported (golint)
    • Line 26: warning: exported method ConsoleClient.Do should have comment or be unexported (golint)
    • grab/grabtest/assert.go
    • Line 13: warning: exported function AssertHTTPResponseStatusCode should have comment or be unexported (golint)
    • Line 22: warning: exported function AssertHTTPResponseHeader should have comment or be unexported (golint)
    • Line 33: warning: exported function AssertHTTPResponseContentLength should have comment or be unexported (golint)
    • Line 45: warning: exported function AssertHTTPResponseBodyLength should have comment or be unexported (golint)
    • Line 62: warning: exported function MustHTTPNewRequest should have comment or be unexported (golint)
    • Line 70: warning: exported function MustHTTPDo should have comment or be unexported (golint)
    • Line 78: warning: exported function MustHTTPDoWithClose should have comment or be unexported (golint)
    • Line 89: warning: exported function AssertSHA256Sum should have comment or be unexported (golint)
    • grab/grabtest/handler.go
    • Line 13: warning: exported var DefaultHandlerContentLength should have comment or be unexported (golint)
    • Line 20: warning: exported type StatusCodeFunc should have comment or be unexported (golint)
    • Line 34: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 49: warning: exported function WithTestServer should have comment or be unexported (golint)
    • grab/grabtest/handler_option.go
    • Line 9: warning: exported type HandlerOption should have comment or be unexported (golint)
    • Line 11: warning: exported function StatusCodeStatic should have comment or be unexported (golint)
    • Line 19: warning: exported function StatusCode should have comment or be unexported (golint)
    • Line 29: warning: exported function MethodWhitelist should have comment or be unexported (golint)
    • Line 36: warning: exported function HeaderBlacklist should have comment or be unexported (golint)
    • Line 43: warning: exported function ContentLength should have comment or be unexported (golint)
    • Line 53: warning: exported function AcceptRanges should have comment or be unexported (golint)
    • Line 60: warning: exported function LastModified should have comment or be unexported (golint)
    • Line 67: warning: exported function TimeToFirstByte should have comment or be unexported (golint)
    • Line 77: warning: exported function RateLimiter should have comment or be unexported (golint)
    • Line 87: warning: exported function AttachmentFilename should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!