Preparing report...

Report for github.com/wneessen/go-mail

(v0.6.1)

A+    Excellent!    Found 12 issues across 60 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!


gofmt100%

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

No problems detected. Good job!


gocyclo80%

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.

    • msgwriter_test.go
    • Line 327: warning: cyclomatic complexity 52 of function TestMsgWriter_addFiles() is high (> 15) (gocyclo)
    • Line 83: warning: cyclomatic complexity 48 of function TestMsgWriter_writeMsg() is high (> 15) (gocyclo)
    • msgwriter.go
    • Line 101: warning: cyclomatic complexity 35 of function (*msgWriter).writeMsg() is high (> 15) (gocyclo)
    • Line 507: warning: cyclomatic complexity 18 of function (*msgWriter).writeBody() is high (> 15) (gocyclo)
    • Line 325: warning: cyclomatic complexity 17 of function (*msgWriter).addFiles() is high (> 15) (gocyclo)
    • eml.go
    • Line 369: warning: cyclomatic complexity 25 of function parseEMLMultipart() is high (> 15) (gocyclo)
    • msg_test.go
    • Line 5694: warning: cyclomatic complexity 55 of function TestMsg_WriteTo() is high (> 15) (gocyclo)
    • Line 2213: warning: cyclomatic complexity 49 of function TestMsg_GetRecipients() is high (> 15) (gocyclo)
    • Line 4114: warning: cyclomatic complexity 41 of function TestMsg_AddAlternativeWriter() is high (> 15) (gocyclo)
    • Line 3784: warning: cyclomatic complexity 37 of function TestMsg_SetBodyWriter() is high (> 15) (gocyclo)
    • Line 6248: warning: cyclomatic complexity 34 of function TestMsg_HasSendError() is high (> 15) (gocyclo)
    • Line 146: warning: cyclomatic complexity 32 of function TestNewMsg() is high (> 15) (gocyclo)
    • Line 2404: warning: cyclomatic complexity 32 of function TestMsg_GetAddrHeader() is high (> 15) (gocyclo)
    • Line 2533: warning: cyclomatic complexity 32 of function TestMsg_GetAddrHeaderString() is high (> 15) (gocyclo)
    • Line 2094: warning: cyclomatic complexity 30 of function TestMsg_GetSender() is high (> 15) (gocyclo)
    • Line 4291: warning: cyclomatic complexity 27 of function TestMsg_AddAlternativeHTMLTemplate() is high (> 15) (gocyclo)
    • Line 4399: warning: cyclomatic complexity 27 of function TestMsg_AddAlternativeTextTemplate() is high (> 15) (gocyclo)
    • Line 5104: warning: cyclomatic complexity 27 of function TestMsg_EmbedReader() is high (> 15) (gocyclo)
    • Line 6930: warning: cyclomatic complexity 25 of function TestMsg_signMessage() is high (> 15) (gocyclo)
    • Line 6743: warning: cyclomatic complexity 24 of function TestMsg_SignWithKeypair() is high (> 15) (gocyclo)
    • Line 4591: warning: cyclomatic complexity 22 of function TestMsg_AttachReader() is high (> 15) (gocyclo)
    • Line 637: warning: cyclomatic complexity 21 of function TestMsg_SetAddrHeader() is high (> 15) (gocyclo)
    • Line 5224: warning: cyclomatic complexity 19 of function TestMsg_EmbedReadSeeker() is high (> 15) (gocyclo)
    • Line 3148: warning: cyclomatic complexity 19 of function TestMsg_GetParts() is high (> 15) (gocyclo)
    • Line 3226: warning: cyclomatic complexity 19 of function TestMsg_GetAttachments() is high (> 15) (gocyclo)
    • Line 3328: warning: cyclomatic complexity 19 of function TestMsg_SetAttachments() is high (> 15) (gocyclo)
    • Line 3563: warning: cyclomatic complexity 19 of function TestMsg_SetEmbeds() is high (> 15) (gocyclo)
    • Line 4690: warning: cyclomatic complexity 19 of function TestMsg_AttachReadSeeker() is high (> 15) (gocyclo)
    • Line 3482: warning: cyclomatic complexity 19 of function TestMsg_GetEmbeds() is high (> 15) (gocyclo)
    • Line 4507: warning: cyclomatic complexity 18 of function TestMsg_AttachFile() is high (> 15) (gocyclo)
    • Line 1935: warning: cyclomatic complexity 17 of function TestMsg_RequestMDNTo() is high (> 15) (gocyclo)
    • Line 6173: warning: cyclomatic complexity 17 of function TestMsg_UpdateReader() is high (> 15) (gocyclo)
    • Line 1824: warning: cyclomatic complexity 17 of function TestMsg_IsDelivered() is high (> 15) (gocyclo)
    • Line 6837: warning: cyclomatic complexity 16 of function TestMsg_SignWithTLSCertificate() is high (> 15) (gocyclo)
    • Line 4012: warning: cyclomatic complexity 16 of function TestMsg_SetBodyTextTemplate() is high (> 15) (gocyclo)
    • Line 3943: warning: cyclomatic complexity 16 of function TestMsg_SetBodyHTMLTemplate() is high (> 15) (gocyclo)
    • Line 5388: warning: cyclomatic complexity 16 of function TestMsg_EmbedTextTemplate() is high (> 15) (gocyclo)
    • Line 5317: warning: cyclomatic complexity 16 of function TestMsg_EmbedHTMLTemplate() is high (> 15) (gocyclo)
    • Line 4854: warning: cyclomatic complexity 16 of function TestMsg_AttachTextTemplate() is high (> 15) (gocyclo)
    • Line 4783: warning: cyclomatic complexity 16 of function TestMsg_AttachHTMLTemplate() is high (> 15) (gocyclo)
    • Line 741: warning: cyclomatic complexity 16 of function TestMsg_SetAddrHeaderIgnoreInvalid() is high (> 15) (gocyclo)
    • Line 4977: warning: cyclomatic complexity 16 of function TestMsg_AttachFromIOFS() is high (> 15) (gocyclo)
    • smtp/smtp_test.go
    • Line 3656: warning: cyclomatic complexity 57 of function handleTestServerConnection() is high (> 15) (gocyclo)
    • Line 2150: warning: cyclomatic complexity 38 of function TestClient_Mail() is high (> 15) (gocyclo)
    • Line 1078: warning: cyclomatic complexity 31 of function TestScramAuth() is high (> 15) (gocyclo)
    • Line 3889: warning: cyclomatic complexity 26 of function (*testSCRAMSMTP).handleSCRAMAuth() is high (> 15) (gocyclo)
    • Line 907: warning: cyclomatic complexity 24 of function TestXOAuth2Auth() is high (> 15) (gocyclo)
    • Line 759: warning: cyclomatic complexity 22 of function TestLoginAuth_noEnc() is high (> 15) (gocyclo)
    • Line 295: warning: cyclomatic complexity 22 of function TestPlainAuth() is high (> 15) (gocyclo)
    • Line 453: warning: cyclomatic complexity 22 of function TestPlainAuth_noEnc() is high (> 15) (gocyclo)
    • Line 608: warning: cyclomatic complexity 22 of function TestLoginAuth() is high (> 15) (gocyclo)
    • Line 1326: warning: cyclomatic complexity 17 of function TestScramAuth_handleServerFirstResponse() is high (> 15) (gocyclo)
    • Line 3409: warning: cyclomatic complexity 17 of function TestClient_GetTLSConnectionState() is high (> 15) (gocyclo)
    • Line 1896: warning: cyclomatic complexity 17 of function TestClient_Verify() is high (> 15) (gocyclo)
    • client.go
    • Line 1231: warning: cyclomatic complexity 30 of function (*Client).auth() is high (> 15) (gocyclo)
    • Line 1365: warning: cyclomatic complexity 17 of function (*Client).sendSingleMsg() is high (> 15) (gocyclo)
    • file_test.go
    • Line 9: warning: cyclomatic complexity 26 of function TestFile() is high (> 15) (gocyclo)
    • smtp/smtp.go
    • Line 457: warning: cyclomatic complexity 19 of function SendMail() is high (> 15) (gocyclo)
    • smime_test.go
    • Line 98: warning: cyclomatic complexity 17 of function TestGetLeafCertificate() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 16 of function TestNewSMIME() is high (> 15) (gocyclo)
    • client_test.go
    • Line 2892: warning: cyclomatic complexity 104 of function TestClient_sendSingleMsg() is high (> 15) (gocyclo)
    • Line 115: warning: cyclomatic complexity 97 of function TestNewClient() is high (> 15) (gocyclo)
    • Line 1688: warning: cyclomatic complexity 53 of function TestClient_DialWithContext() is high (> 15) (gocyclo)
    • Line 3974: warning: cyclomatic complexity 42 of function handleTestServerConnection() is high (> 15) (gocyclo)
    • Line 2157: warning: cyclomatic complexity 28 of function TestClient_DialAndSendWithContext() is high (> 15) (gocyclo)
    • Line 1147: warning: cyclomatic complexity 28 of function TestClient_SetDebugLog() is high (> 15) (gocyclo)
    • Line 2758: warning: cyclomatic complexity 26 of function TestClient_DialToSMTPClientWithContext() is high (> 15) (gocyclo)
    • Line 1048: warning: cyclomatic complexity 25 of function TestClient_SetSSLPort() is high (> 15) (gocyclo)
    • Line 1558: warning: cyclomatic complexity 25 of function TestClient_Close() is high (> 15) (gocyclo)
    • Line 2638: warning: cyclomatic complexity 23 of function TestClient_Send() is high (> 15) (gocyclo)
    • Line 2387: warning: cyclomatic complexity 23 of function TestClient_auth() is high (> 15) (gocyclo)
    • Line 3582: warning: cyclomatic complexity 23 of function TestClient_onlinetests() is high (> 15) (gocyclo)
    • Line 2041: warning: cyclomatic complexity 22 of function TestClient_Reset() is high (> 15) (gocyclo)
    • Line 3480: warning: cyclomatic complexity 19 of function TestClient_checkConn() is high (> 15) (gocyclo)
    • Line 940: warning: cyclomatic complexity 17 of function TestClient_SetTLSPortPolicy() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words