bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Standardize some error messages.


From: Bo Borgerson
Subject: [PATCH] Standardize some error messages.
Date: Fri, 4 Apr 2008 11:17:21 -0400

Hi,

This may be too small to bother with (if so I'll know next time), but
I was reading standards.txt, and noticed the following in section 4.4
on formatting error messages:

----
   The string MESSAGE should not begin with a capital letter when it
follows a program name and/or file name, because that isn't the
beginning of a sentence.  (The sentence conceptually starts at the
beginning of the line.)  Also, it should not end with a period.
----

Which rang a bell from a section of src/wc.c I was reading yesterday
that I happened to notice ended an error message with a period.

So I ran the following in src:

$ grep error *.c | perl -e '/"[A-Z]|\."/ and print while (<STDIN>);'

and found a few more, which I changed to conform to the format
specified in standards.txt.

I also noticed that there were several instances of messages starting
with 'WARNING:', or 'FATAL:', and two instances of 'Warning:'.  The
standards don't seem to mention any convention there, but I changed
the 'Warning' cases to 'WARNING', just for consistency.

This may be a case of historical behavior being the best convention,
as I'm sure there are users out there parsing error output from these
utilities and relying on the current messages (I had to change two
tests that were doing just that).  If not, please see the attached
patch.

Thanks,

Bo

Attachment: error-msgs.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]