Show 39 quoted lines
> On Sun, Jun 1, 2025 at 3:12 AM Aditya Garg <gargaditya08@live.com> wrote:
>> 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 <gargaditya08@live.com>
>> ---
>> 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.
>
>> @@ -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.