[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sc_error_message_uppercase
From: |
Eric Blake |
Subject: |
Re: sc_error_message_uppercase |
Date: |
Thu, 27 Jan 2011 08:10:20 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
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
>> sc_error_message_uppercase:
>> @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 ';'?
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
capitalization of error messages and option descriptions, Bruno Haible, 2011/01/27