Preparing report...

Report for github.com/caddyserver/caddy

(v1.0.5)

A+    Excellent!    Found 48 issues across 203 files

Tweet

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!


gofmt96%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo78%

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.

    • caddytls/config.go
    • Line 329: warning: cyclomatic complexity 20 of function assertConfigsCompatible() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 17 of function (*Config).buildStandardTLSConfig() is high (> 15) (gocyclo)
    • caddy.go
    • Line 691: warning: cyclomatic complexity 31 of function startServers() is high (> 15) (gocyclo)
    • Line 488: warning: cyclomatic complexity 21 of function startWithListenerFds() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 20 of function (*Instance).Restart() is high (> 15) (gocyclo)
    • caddytls/setup.go
    • Line 53: warning: cyclomatic complexity 81 of function setupTLS() is high (> 15) (gocyclo)
    • Line 389: warning: cyclomatic complexity 22 of function loadCertsInDir() is high (> 15) (gocyclo)
    • caddyhttp/proxy/upstream.go
    • Line 337: warning: cyclomatic complexity 77 of function parseBlock() is high (> 15) (gocyclo)
    • Line 109: warning: cyclomatic complexity 22 of function NewStaticUpstreams() is high (> 15) (gocyclo)
    • Line 622: warning: cyclomatic complexity 17 of function (*staticUpstream).healthCheck() is high (> 15) (gocyclo)
    • caddyhttp/proxy/reverseproxy.go
    • Line 155: warning: cyclomatic complexity 29 of function NewSingleHostReverseProxy() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 26 of function (*ReverseProxy).ServeHTTP() is high (> 15) (gocyclo)
    • caddyhttp/httpserver/plugin.go
    • Line 129: warning: cyclomatic complexity 24 of function (*httpContext).InspectServerBlocks() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 24 of function (*httpContext).MakeServers() is high (> 15) (gocyclo)
    • Line 506: warning: cyclomatic complexity 16 of function standardizeAddress() is high (> 15) (gocyclo)
    • upgrade.go
    • Line 50: warning: cyclomatic complexity 19 of function Upgrade() is high (> 15) (gocyclo)
    • caddyhttp/httpserver/mitm.go
    • Line 237: 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)
    • sigtrap_posix.go
    • Line 29: warning: cyclomatic complexity 16 of function trapSignalsPosix() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!