Preparing report...

Report for github.com/puma/puma-dev

(v0.18.1)

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


gocyclo88%

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.

    • dev/app.go
    • Line 455: warning: cyclomatic complexity 16 of function (*AppPool).lookupApp() is high (> 15) (gocyclo)
    • httpu/transport.go
    • Line 863: warning: cyclomatic complexity 33 of function (*persistConn).readLoop() is high (> 15) (gocyclo)
    • Line 586: warning: cyclomatic complexity 29 of function (*Transport).dialConn() is high (> 15) (gocyclo)
    • Line 1206: warning: cyclomatic complexity 25 of function (*persistConn).roundTrip() is high (> 15) (gocyclo)
    • httpu/request.go
    • Line 74: warning: cyclomatic complexity 26 of function writeRequestFull() is high (> 15) (gocyclo)
    • httpu/transfer.go
    • Line 311: warning: cyclomatic complexity 23 of function readTransfer() is high (> 15) (gocyclo)
    • Line 51: warning: cyclomatic complexity 21 of function newTransferWriter() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 16 of function (*transferWriter).WriteBody() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • dev/devtest/testutils.go
    • Line 21: warning: exported var DebugLoggingEnabled should have comment or be unexported (golint)
    • Line 42: warning: comment on exported function StubCommandLineArgs should be of the form "StubCommandLineArgs ..." (golint)
    • Line 204: warning: exported function LinkTestApps should have comment or be unexported (golint)
    • Line 221: warning: exported function LinkAllTestApps should have comment or be unexported (golint)
    • dev/app.go
    • Line 27: warning: exported const DefaultThreads should have comment or be unexported (golint)
    • Line 29: warning: exported var ErrUnexpectedExit should have comment or be unexported (golint)
    • Line 31: warning: exported type App should have comment or be unexported (golint)
    • Line 66: warning: exported method App.SetAddress should have comment or be unexported (golint)
    • Line 78: warning: exported method App.Address should have comment or be unexported (golint)
    • Line 86: warning: exported method App.Kill should have comment or be unexported (golint)
    • Line 195: warning: exported method App.WaitTilReady should have comment or be unexported (golint)
    • Line 212: warning: exported const Booting should have comment (or a comment on this block) or be unexported (golint)
    • Line 217: warning: exported method App.Status should have comment or be unexported (golint)
    • Line 234: warning: exported method App.Log should have comment or be unexported (golint)
    • Line 270: warning: exported method AppPool.LaunchApp should have comment or be unexported (golint)
    • Line 426: warning: exported type AppPool should have comment or be unexported (golint)
    • Line 438: warning: receiver name a should be consistent with previous receiver name pool for AppPool (golint)
    • Line 452: warning: exported var ErrUnknownApp should have comment or be unexported (golint)
    • Line 455: warning: receiver name a should be consistent with previous receiver name pool for AppPool (golint)
    • Line 565: warning: exported method AppPool.FindAppByDomainName should have comment or be unexported (golint)
    • Line 565: warning: receiver name a should be consistent with previous receiver name pool for AppPool (golint)
    • Line 595: warning: receiver name a should be consistent with previous receiver name pool for AppPool (golint)
    • Line 611: warning: exported method AppPool.ForApps should have comment or be unexported (golint)
    • Line 611: warning: receiver name a should be consistent with previous receiver name pool for AppPool (golint)
    • Line 620: warning: exported method AppPool.Purge should have comment or be unexported (golint)
    • Line 620: warning: receiver name a should be consistent with previous receiver name pool for AppPool (golint)
    • dev/events.go
    • Line 12: warning: exported type Events should have comment or be unexported (golint)
    • Line 16: warning: exported method Events.Add should have comment or be unexported (golint)
    • Line 38: warning: exported method Events.WriteTo should have comment or be unexported (golint)
    • cmd/puma-dev/main.go
    • Line 12: warning: exported var EarlyExitClean should have comment or be unexported (golint)
    • Line 20: warning: exported type CommandResult should have comment or be unexported (golint)
    • Line 25: warning: exported type ByDecreasingTLDComplexity should have comment or be unexported (golint)
    • dev/resolver.go
    • Line 12: warning: exported function ConfigureResolver should have comment or be unexported (golint)
    • linebuffer/linebuffer.go
    • Line 8: warning: exported const DefaultSize should have comment or be unexported (golint)
    • Line 10: warning: exported type LineBuffer should have comment or be unexported (golint)
    • Line 18: warning: exported method LineBuffer.Append should have comment or be unexported (golint)
    • Line 40: warning: exported method LineBuffer.Do should have comment or be unexported (golint)
    • Line 74: warning: exported method LineBuffer.WriteTo should have comment or be unexported (golint)
    • homedir/homedir.go
    • Line 24: warning: exported var ErrNoHomeDir should have comment or be unexported (golint)
    • Line 87: warning: exported function MustExpand should have comment or be unexported (golint)
    • dev/ssl_linux.go
    • Line 5: warning: exported const SupportDir should have comment or be unexported (golint)
    • Line 7: warning: exported function TrustCert should have comment or be unexported (golint)
    • httpu/transfer.go
    • Line 358: 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 538: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dev/dns.go
    • Line 11: warning: exported type DNSResponder should have comment or be unexported (golint)
    • Line 19: warning: exported function NewDNSResponder should have comment or be unexported (golint)
    • Line 72: warning: exported method DNSResponder.Serve should have comment or be unexported (golint)
    • dev/http.go
    • Line 20: warning: exported type HTTPServer should have comment or be unexported (golint)
    • Line 34: warning: exported method HTTPServer.Setup should have comment or be unexported (golint)
    • Line 58: warning: exported method HTTPServer.AppClosed should have comment or be unexported (golint)
    • Line 95: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dev/http_linux.go
    • Line 8: warning: exported method HTTPServer.ServeTLS should have comment or be unexported (golint)
    • Line 24: warning: exported method HTTPServer.Serve should have comment or be unexported (golint)
    • dev/ssl.go
    • Line 25: warning: exported var CACert should have comment or be unexported (golint)
    • Line 27: warning: exported function GeneratePumaDevCertificateAuthority should have comment or be unexported (golint)
    • Line 89: warning: exported function SetupOurCert should have comment or be unexported (golint)
    • Line 123: warning: exported function NewCertCache should have comment or be unexported (golint)
    • dev/stop.go
    • Line 5: warning: exported function Stop should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • dev/app.go
    • Line 136: warning: ineffectual assignment to err (ineffassign)
    • Line 136: warning: ineffectual assignment to err (ineffassign)

misspell97%

Misspell Finds commonly misspelled English words