Thread (198 messages) 198 messages, 6 authors, 2025-06-20

Re: [PATCH v10 6/9] imap-send: fix numerous spelling and grammar mistakes in logs

From: Aditya Garg <hidden>
Date: 2025-06-01 07:32:46


On 01/06/25 12:58 pm, Eric Sunshine wrote:
On Sun, Jun 1, 2025 at 3:12 AM Aditya Garg [off-list ref] wrote:
quoted
A lot of spelling and grammar mistakes were found in the logs shown to
the user while using imap-send. Most of them are lack of a full stop at
the end of a sentence and first word of a sentence not being capitalized.

Signed-off-by: Aditya Garg <redacted>
---
diff --git a/imap-send.c b/imap-send.c
@@ -249,9 +249,9 @@ static int verify_hostname(X509 *cert, const char *hostname)
        if (!(subj = X509_get_subject_name(cert)))
-               return error("cannot get certificate subject");
+               return error("Cannot get certificate subject");
        if ((len = X509_NAME_get_text_by_NID(subj, NID_commonName, cname, sizeof(cname))) < 0)
-               return error("cannot get certificate common name");
+               return error("Cannot get certificate common name");
This patch generally seems to be taking the code in a direction
opposite the rest of the project. Quoting from
Documentation/CodingGuidelines:

  Error Messages

   - Do not end a single-sentence error message with a full stop.

   - Do not capitalize the first word, only because it is the first
     word in the message ("unable to open '%s'", not "Unable to open
     '%s'"). But "SHA-3 not supported" is fine, because the reason the
     first word is capitalized is not because it is at the beginning
     of the sentence, but because the word would be spelled in capital
     letters even when it appeared in the middle of the sentence.
quoted
@@ -1053,7 +1053,7 @@ static int auth_cram_md5(struct imap_store *ctx, const char *prompt)
        if (ret != strlen(response)) {
                free(response);
-               return error("IMAP error: sending response failed");
+               return error("IMAP error: sending CRAM-MD5 response failed");
        }
Providing more context in the error message, as done here, seems welcome.
Hmm, ok
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help