[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 27 Jan 2011 16:16:19 +0100
Eric Blake wrote:
> On 01/27/2011 07:47 AM, Jim Meyering wrote:
>> Simon Josefsson wrote:
>>> Is the regexp wrong here? It looks fine to me, maint.mk:
>>> # Error messages should not start with a capital letter
>>> @grep -nEA2 '[^rp]error *\(' $$($(VC_LIST_EXCEPT)) \
> This unconditionally looks for error() and the two lines after.
>> That rule uses the heuristic of searching two lines after each
>> use of error(..., in case message arguments are on continued lines.
> Is there a way to tighten it, by passing the grep output through a sed
> script that combines multiple lines (easily determined by the difference
> between file: and file- for matching vs. context lines and the --
> separator between hunks), then limit the detection of the capital letter
> to one occurring after error( but before ';'?
That sounds like it'd be an improvement. With that, we could
search a couple more lines of following context, too.
While I haven't been willing to spend any more time on it,
you're welcome to do so.
One tiny fly in the ointment: ';' inside a string or in a comment
between concatenated strings would cause trouble.
capitalization of error messages and option descriptions, Bruno Haible, 2011/01/27
- Re: capitalization of error messages and option descriptions, Simon Josefsson, 2011/01/27
- Re: capitalization of error messages and option descriptions, Jim Meyering, 2011/01/27
- Re: capitalization of error messages and option descriptions, Ralf Wildenhues, 2011/01/27
- Re: capitalization of error messages and option descriptions, Karl Berry, 2011/01/28
- Standard error message format (was Re: capitalization of error messages...), Bruce Korb, 2011/01/28
- Re: Standard error message format, Ralf Wildenhues, 2011/01/28
- Re: Standard error message format, Bruce Korb, 2011/01/28