Preparing report...

Report for github.com/emersion/go-smtp

A    Great!    Found 8 issues across 16 files

Tweet

gofmt93%

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!


gocyclo75%

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.

    • go-smtp/conn.go
    • Line 296: warning: cyclomatic complexity 32 of function (*Conn).handleMail() is high (> 15) (gocyclo)
    • Line 659: warning: cyclomatic complexity 23 of function (*Conn).handleBdat() is high (> 15) (gocyclo)
    • Line 95: warning: cyclomatic complexity 22 of function (*Conn).handle() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 17 of function (*Conn).handleAuth() is high (> 15) (gocyclo)
    • go-smtp/data.go
    • Line 66: warning: cyclomatic complexity 23 of function (*dataReader).Read() is high (> 15) (gocyclo)
    • go-smtp/client_test.go
    • Line 412: warning: cyclomatic complexity 22 of function TestHello() is high (> 15) (gocyclo)
    • Line 74: warning: cyclomatic complexity 21 of function TestBasic() is high (> 15) (gocyclo)
    • go-smtp/client.go
    • Line 528: warning: cyclomatic complexity 18 of function SendMail() is high (> 15) (gocyclo)
    • Line 375: warning: cyclomatic complexity 16 of function (*Client).Mail() is high (> 15) (gocyclo)

golint56%

Golint is a linter for Go source code.

    • go-smtp/client.go
    • Line 459: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-smtp/conn.go
    • Line 23: warning: exported type ConnectionState should have comment or be unexported (golint)
    • Line 30: warning: exported type Conn should have comment or be unexported (golint)
    • Line 162: warning: exported method Conn.Server should have comment or be unexported (golint)
    • Line 166: warning: exported method Conn.Session should have comment or be unexported (golint)
    • Line 172: warning: comment on exported method Conn.SetSession should be of the form "SetSession ..." (golint)
    • Line 179: warning: exported method Conn.Close should have comment or be unexported (golint)
    • Line 206: warning: exported method Conn.State should have comment or be unexported (golint)
    • Line 927: 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 935: warning: exported method Conn.Reject should have comment or be unexported (golint)
    • Line 944: warning: exported method Conn.WriteResponse should have comment or be unexported (golint)
    • Line 972: warning: comment on exported method Conn.ReadLine should be of the form "ReadLine ..." (golint)
    • go-smtp/data.go
    • Line 8: warning: exported type EnhancedCode should have comment or be unexported (golint)
    • Line 35: warning: exported method SMTPError.Temporary should have comment or be unexported (golint)
    • Line 39: warning: exported var ErrDataTooLarge should have comment or be unexported (golint)
    • go-smtp/server.go
    • Line 18: warning: comment on exported type SaslServerFactory should be of the form "SaslServerFactory ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported type Server should be of the form "Server ..." (with optional leading article) (golint)
    • Line 76: warning: comment on exported function NewServer should be of the form "NewServer ..." (golint)
    • go-smtp/backend.go
    • Line 8: warning: exported var ErrAuthRequired should have comment or be unexported (golint)
    • Line 19: warning: comment on exported type Backend should be of the form "Backend ..." (with optional leading article) (golint)
    • Line 24: warning: exported type BodyType should have comment or be unexported (golint)
    • Line 27: warning: exported const Body7Bit should have comment (or a comment on this block) or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell81%

Misspell Finds commonly misspelled English words

    • go-smtp/conn.go
    • Line 137: warning: "sucessfully" is a misspelling of "successfully" (misspell)
    • Line 791: warning: "pased" is a misspelling of "passed" (misspell)
    • Line 916: warning: "occured" is a misspelling of "occurred" (misspell)
    • go-smtp/client_test.go
    • Line 195: warning: "succeded" is a misspelling of "succeeded" (misspell)
    • Line 213: warning: "succeded" is a misspelling of "succeeded" (misspell)
    • Line 228: warning: "succeded" is a misspelling of "succeeded" (misspell)
    • Line 277: warning: "succeded" is a misspelling of "succeeded" (misspell)
    • Line 284: warning: "succeded" is a misspelling of "succeeded" (misspell)