Preparing report...

Report for github.com/dutchcoders/ares

A    Great!    Found 9 issues across 13 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!


gocyclo84%

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.

    • ares/server/cookie.go
    • Line 41: warning: cyclomatic complexity 22 of function parseCookie() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 21 of function isCookieDomainName() is high (> 15) (gocyclo)

golint30%

Golint is a linter for Go source code.

    • ares/server/document.go
    • Line 7: warning: exported type Document should have comment or be unexported (golint)
    • Line 15: warning: exported type Request should have comment or be unexported (golint)
    • Line 26: warning: exported type Response should have comment or be unexported (golint)
    • ares/server/log.go
    • Line 10: warning: exported type ApacheLogRecord should have comment or be unexported (golint)
    • Line 21: warning: exported method ApacheLogRecord.Log should have comment or be unexported (golint)
    • Line 34: warning: exported method ApacheLogRecord.WriteHeader should have comment or be unexported (golint)
    • Line 39: warning: exported type ApacheLoggingHandler should have comment or be unexported (golint)
    • Line 46: warning: exported function NewApacheLoggingHandler should have comment or be unexported (golint)
    • ares/server/actions.go
    • Line 17: warning: exported type ActionRequester should have comment or be unexported (golint)
    • Line 21: warning: exported type ActionRequestRedirect should have comment or be unexported (golint)
    • Line 25: warning: exported method ActionRequestRedirect.OnRequest should have comment or be unexported (golint)
    • Line 53: warning: exported type ActionRequestServe should have comment or be unexported (golint)
    • Line 57: warning: exported method ActionRequestServe.OnRequest should have comment or be unexported (golint)
    • Line 94: warning: exported type ActionRequestFile should have comment or be unexported (golint)
    • Line 98: warning: exported method ActionRequestFile.OnRequest should have comment or be unexported (golint)
    • Line 138: warning: exported type ActionResponserer should have comment or be unexported (golint)
    • Line 142: warning: exported type ActionResponseReplace should have comment or be unexported (golint)
    • Line 146: warning: exported method ActionResponseReplace.OnResponse should have comment or be unexported (golint)
    • Line 182: warning: exported type ActionResponseInject should have comment or be unexported (golint)
    • Line 186: warning: exported method ActionResponseInject.OnResponse should have comment or be unexported (golint)
    • ares/server/changestream.go
    • Line 8: warning: exported function NewChangeStream should have comment or be unexported (golint)
    • Line 12: warning: exported type ChangeStream should have comment or be unexported (golint)
    • Line 61: warning: exported method ChangeStream.Close should have comment or be unexported (golint)
    • ares/server/proxy.go
    • Line 31: warning: exported const ApacheFormatPattern should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type Server should have comment or be unexported (golint)
    • Line 58: warning: exported function New should have comment or be unexported (golint)
    • Line 94: warning: exported method Server.Run should have comment or be unexported (golint)
    • ares/server/roundtrip.go
    • Line 87: warning: exported function HostNotConfigured should have comment or be unexported (golint)
    • Line 107: warning: exported function IsMediaType should have comment or be unexported (golint)
    • Line 112: warning: exported method Server.GetHost should have comment or be unexported (golint)
    • Line 151: warning: receiver name t should be consistent with previous receiver name p for Server (golint)
    • Line 163: 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 198: warning: exported method Server.RoundTrip should have comment or be unexported (golint)
    • Line 198: warning: receiver name t should be consistent with previous receiver name p for Server (golint)
    • ares/cmd/cmd.go
    • Line 12: warning: exported var Version should have comment or be unexported (golint)
    • Line 57: warning: exported type Cmd should have comment or be unexported (golint)
    • Line 61: warning: exported function VersionAction should have comment or be unexported (golint)
    • Line 65: warning: exported function New should have comment or be unexported (golint)
    • ares/server/config.go
    • Line 27: warning: exported type Host should have comment or be unexported (golint)
    • Line 33: warning: exported type Action should have comment or be unexported (golint)
    • Line 50: warning: exported function Config should have comment or be unexported (golint)
    • Line 93: warning: exported function Address should have comment or be unexported (golint)
    • Line 99: warning: exported function TLSAddress should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign92%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!