Preparing report...

Report for github.com/emersion/go-smtp

(v0.23.0)

A+    Excellent!    Found 5 issues across 15 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!


gocyclo66%

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.

    • client_test.go
    • Line 72: warning: cyclomatic complexity 25 of function TestBasic() is high (> 15) (gocyclo)
    • Line 406: warning: cyclomatic complexity 20 of function TestHello() is high (> 15) (gocyclo)
    • client.go
    • Line 492: warning: cyclomatic complexity 24 of function (*Client).Rcpt() is high (> 15) (gocyclo)
    • Line 426: warning: cyclomatic complexity 22 of function (*Client).Mail() is high (> 15) (gocyclo)
    • data.go
    • Line 71: warning: cyclomatic complexity 22 of function (*dataReader).Read() is high (> 15) (gocyclo)
    • server_test.go
    • Line 1412: warning: cyclomatic complexity 35 of function TestServerDSNwithSMTPUTF8() is high (> 15) (gocyclo)
    • Line 1327: warning: cyclomatic complexity 27 of function TestServerDSN() is high (> 15) (gocyclo)
    • conn.go
    • Line 311: warning: cyclomatic complexity 34 of function (*Conn).handleMail() is high (> 15) (gocyclo)
    • Line 485: warning: cyclomatic complexity 31 of function decodeUTF8AddrXtext() is high (> 15) (gocyclo)
    • Line 665: warning: cyclomatic complexity 27 of function (*Conn).handleRcpt() is high (> 15) (gocyclo)
    • Line 971: warning: cyclomatic complexity 23 of function (*Conn).handleBdat() is high (> 15) (gocyclo)
    • Line 222: warning: cyclomatic complexity 20 of function (*Conn).handleGreet() is high (> 15) (gocyclo)
    • Line 90: warning: cyclomatic complexity 20 of function (*Conn).handle() is high (> 15) (gocyclo)

ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • client.go
    • Line 155: warning: ineffectual assignment to r (ineffassign)
    • Line 155: warning: ineffectual assignment to r (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words

    • conn.go
    • Line 1103: warning: "pased" is a misspelling of "passed" (misspell)
    • Line 1228: warning: "occured" is a misspelling of "occurred" (misspell)