Preparing report...

Report for github.com/square/certigo

A+    Excellent!    Found 24 issues across 75 files

Tweet

gofmt98%

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!


golint90%

Golint is a linter for Go source code.

    • certigo/lib/verify.go
    • Line 40: warning: exported type SimpleVerification should have comment or be unexported (golint)
    • Line 48: warning: exported type SimpleResult should have comment or be unexported (golint)
    • Line 56: warning: exported method SimpleResult.MarshalJSON should have comment or be unexported (golint)
    • Line 101: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 112: warning: exported function VerifyChain should have comment or be unexported (golint)
    • Line 184: warning: exported function PrintVerifyResult should have comment or be unexported (golint)
    • certigo/starttls/psql/conn.go
    • Line 82: warning: exported type Dialer should have comment or be unexported (golint)
    • Line 242: warning: exported function Open should have comment or be unexported (golint)
    • Line 246: warning: exported function DialOpen should have comment or be unexported (golint)
    • Line 315: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 374: warning: exported function DumpTLS should have comment or be unexported (golint)
    • Line 444: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 616: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 621: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 628: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 650: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 657: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 693: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 715: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 720: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 750: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 875: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 897: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 913: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 932: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 936: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 960: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 973: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 996: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1009: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1016: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1031: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1041: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1052: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1089: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1111: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1132: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1138: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1187: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1228: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1395: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1571: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1606: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1662: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1679: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1694: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1720: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1738: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1753: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • Line 1782: warning: receiver name cn should be consistent with previous receiver name c for conn (golint)
    • certigo/starttls/psql/notify.go
    • Line 63: warning: comment on exported function NewListenerConn should be of the form "NewListenerConn ..." (golint)
    • Line 217: warning: comment on exported method ListenerConn.Listen should be of the form "Listen ..." (golint)
    • Line 222: warning: comment on exported method ListenerConn.Unlisten should be of the form "Unlisten ..." (golint)
    • Line 227: warning: comment on exported method ListenerConn.UnlistenAll should be of the form "UnlistenAll ..." (golint)
    • Line 336: warning: exported method ListenerConn.Close should have comment or be unexported (golint)
    • Line 357: warning: exported var ErrChannelAlreadyOpen should have comment or be unexported (golint)
    • Line 358: warning: exported var ErrChannelNotOpen should have comment or be unexported (golint)
    • Line 360: warning: exported type ListenerEventType should have comment or be unexported (golint)
    • Line 363: warning: comment on exported const ListenerEventConnected should be of the form "ListenerEventConnected ..." (golint)
    • Line 367: warning: comment on exported const ListenerEventDisconnected should be of the form "ListenerEventDisconnected ..." (golint)
    • Line 372: warning: comment on exported const ListenerEventReconnected should be of the form "ListenerEventReconnected ..." (golint)
    • Line 377: warning: comment on exported const ListenerEventConnectionAttemptFailed should be of the form "ListenerEventConnectionAttemptFailed ..." (golint)
    • Line 383: warning: exported type EventCallbackType should have comment or be unexported (golint)
    • Line 642: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • certigo/cli/terminal/terminal.go
    • Line 30: warning: exported function OpenTTY should have comment or be unexported (golint)
    • Line 34: warning: exported method TTY.Output should have comment or be unexported (golint)
    • Line 42: warning: exported method TTY.SetDefaultPassword should have comment or be unexported (golint)
    • Line 46: warning: exported method TTY.ReadPassword should have comment or be unexported (golint)
    • Line 75: warning: exported method TTY.DetermineWidth should have comment or be unexported (golint)
    • certigo/cli/terminal/testing.go
    • Line 21: warning: exported method TestTerminal.Output should have comment or be unexported (golint)
    • Line 29: warning: exported method TestTerminal.SetDefaultPassword should have comment or be unexported (golint)
    • Line 33: warning: exported method TestTerminal.ReadPassword should have comment or be unexported (golint)
    • Line 37: warning: exported method TestTerminal.DetermineWidth should have comment or be unexported (golint)
    • certigo/cli/cli.go
    • Line 55: warning: exported function Run should have comment or be unexported (golint)
    • Line 103: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 189: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

gocyclo74%

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.

    • certigo/starttls/mysql/packets.go
    • Line 1108: warning: cyclomatic complexity 37 of function (*binaryRows).readRow() is high (> 15) (gocyclo)
    • Line 878: warning: cyclomatic complexity 26 of function (*mysqlStmt).writeExecutePacket() is high (> 15) (gocyclo)
    • certigo/starttls/psql/conn.go
    • Line 160: warning: cyclomatic complexity 27 of function (*conn).handlePgpass() is high (> 15) (gocyclo)
    • Line 1854: warning: cyclomatic complexity 24 of function parseEnviron() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 20 of function parseOpts() is high (> 15) (gocyclo)
    • Line 246: warning: cyclomatic complexity 18 of function DialOpen() is high (> 15) (gocyclo)
    • Line 374: warning: cyclomatic complexity 18 of function DumpTLS() is high (> 15) (gocyclo)
    • Line 1484: warning: cyclomatic complexity 16 of function (*rows).Next() is high (> 15) (gocyclo)
    • certigo/starttls/mysql/dsn.go
    • Line 368: warning: cyclomatic complexity 48 of function parseDSNParams() is high (> 15) (gocyclo)
    • Line 61: warning: cyclomatic complexity 43 of function (*Config).FormatDSN() is high (> 15) (gocyclo)
    • Line 268: warning: cyclomatic complexity 24 of function ParseDSN() is high (> 15) (gocyclo)
    • certigo/starttls/ldap/ldap.go
    • Line 90: warning: cyclomatic complexity 25 of function addLDAPDescriptions() is high (> 15) (gocyclo)
    • Line 153: warning: cyclomatic complexity 20 of function addControlDescriptions() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words