Preparing report...

Report for github.com/icasei/caddy

A+    Excellent!    Found 49 issues across 221 files

Tweet

gofmt96%

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!


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.

    • caddy/caddytls/setup.go
    • Line 41: warning: cyclomatic complexity 71 of function setupTLS() is high (> 15) (gocyclo)
    • Line 302: warning: cyclomatic complexity 18 of function loadCertsInDir() is high (> 15) (gocyclo)
    • caddy/caddyhttp/httpserver/plugin.go
    • Line 217: warning: cyclomatic complexity 24 of function (*httpContext).MakeServers() is high (> 15) (gocyclo)
    • Line 127: warning: cyclomatic complexity 21 of function (*httpContext).InspectServerBlocks() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 18 of function standardizeAddress() is high (> 15) (gocyclo)
    • caddy/caddyhttp/httpserver/mitm.go
    • Line 236: warning: cyclomatic complexity 23 of function parseRawClientHello() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 20 of function (*tlsHandler).ServeHTTP() is high (> 15) (gocyclo)
    • caddy/caddyhttp/proxy/upstream.go
    • Line 297: warning: cyclomatic complexity 59 of function parseBlock() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 23 of function NewStaticUpstreams() is high (> 15) (gocyclo)
    • Line 507: warning: cyclomatic complexity 16 of function (*staticUpstream).healthCheck() is high (> 15) (gocyclo)
    • caddy/caddy.go
    • Line 692: warning: cyclomatic complexity 28 of function startServers() is high (> 15) (gocyclo)
    • Line 495: warning: cyclomatic complexity 21 of function startWithListenerFds() is high (> 15) (gocyclo)

golint97%

Golint is a linter for Go source code.

    • caddy/caddytls/config.go
    • Line 578: warning: comment on exported var SupportedProtocols should be of the form "SupportedProtocols ..." (golint)
    • Line 587: warning: comment on exported var SupportedCiphersMap should be of the form "SupportedCiphersMap ..." (golint)
    • caddy/caddyhttp/log/setup.go
    • Line 74: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 87: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 168: warning: comment on exported const DefaultIP4Mask should be of the form "DefaultIP4Mask ..." (golint)
    • Line 171: warning: exported const DefaultIP6Mask should have comment (or a comment on this block) or be unexported (golint)
    • caddy/caddyhttp/httpserver/condition_test.go
    • Line 215: warning: don't use underscores in Go names; var rex_b should be rexB (golint)
    • Line 289: warning: don't use underscores in Go names; var test_if should be testIf (golint)
    • Line 303: warning: don't use underscores in Go names; range var if_c should be ifC (golint)
    • Line 304: warning: don't use underscores in Go names; var expected_c should be expectedC (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!