Re: [PATCH] checkpatch: allow single space before labels
From: Mike Frysinger
Date: Sun Oct 17 2010 - 04:25:28 EST
On Sun, Oct 17, 2010 at 04:21, Joe Perches wrote:
> On Sun, 2010-10-17 at 04:05 -0400, Mike Frysinger wrote:
>> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
>> Â# check for spaces at the beginning of a line.
>> - Â Â Â Â Â Â if ($rawline =~ /^\+ / && $rawline !~ /\+ +\*/) Â{
>> + Â Â Â Â Â Â if ($rawline =~ /^\+ / && $rawline !~ /\+ +\*/ && $rawline !~ /:$/) Â{
>
> Perhaps that's not an ideal test.
> Maybe "&& $rawline !~ /^\+ \w+:/" is better.
>
> The current test misidentify labels with comments:
i know, but i didnt want to dive further down this rabbit hole. most
labels do not have trailing comments, or at least all the ones i deal
with.
feel free to extend however as long as the end result is no warnings
for " foo:" ;).
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/