LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH]CHECKPATCH:fix misleading output on spaces/tabs error
@ 2008-03-19 3:06 Daolong Wang
2008-03-19 14:13 ` Andy Whitcroft
0 siblings, 1 reply; 3+ messages in thread
From: Daolong Wang @ 2008-03-19 3:06 UTC (permalink / raw)
To: linux-kernel; +Cc: apw, rdunlap, jschopp
I got confused by this line:
"ERROR: use tabs not spaces"
It literally means "use tabs but not spaces is WRONG", which
is WRONG.
"ERROR: do not use spaces when tabs expected"
sounds more appropriate.
Signed-off-by: Wang Daolong <ahlongxp@gmail.com>
---
--- scripts/checkpatch.pl.org 2008-03-18 23:08:41.000000000 +0800
+++ scripts/checkpatch.pl 2008-03-18 23:19:34.000000000 +0800
@@ -1064,7 +1064,7 @@ sub process {
if ($rawline =~ /^\+\s* \t\s*\S/ ||
$rawline =~ /^\+\s* \s*/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
- ERROR("use tabs not spaces\n" . $herevet);
+ ERROR("do not use spaces when tabs expected\n" . $herevet);
}
# check for RCS/CVS revision markers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]CHECKPATCH:fix misleading output on spaces/tabs error
2008-03-19 3:06 [PATCH]CHECKPATCH:fix misleading output on spaces/tabs error Daolong Wang
@ 2008-03-19 14:13 ` Andy Whitcroft
[not found] ` <dc84318c0803192108l28292288yec6f75b79aa65e80@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andy Whitcroft @ 2008-03-19 14:13 UTC (permalink / raw)
To: Daolong Wang; +Cc: linux-kernel, rdunlap, jschopp
On Wed, Mar 19, 2008 at 11:06:02AM +0800, Daolong Wang wrote:
> I got confused by this line:
>
> "ERROR: use tabs not spaces"
>
> It literally means "use tabs but not spaces is WRONG", which
> is WRONG.
>
> "ERROR: do not use spaces when tabs expected"
>
> sounds more appropriate.
Except that it says "use tabs not spaces when you should use tabs" and
doesn't actually tell us what the error was, nor how to correct it. So
its not really any better than the original (which is also useless in
this regard).
How about:
"code indent should use tabs where possible"
> Signed-off-by: Wang Daolong <ahlongxp@gmail.com>
> ---
> --- scripts/checkpatch.pl.org 2008-03-18 23:08:41.000000000 +0800
> +++ scripts/checkpatch.pl 2008-03-18 23:19:34.000000000 +0800
> @@ -1064,7 +1064,7 @@ sub process {
> if ($rawline =~ /^\+\s* \t\s*\S/ ||
> $rawline =~ /^\+\s* \s*/) {
> my $herevet = "$here\n" . cat_vet($rawline) . "\n";
> - ERROR("use tabs not spaces\n" . $herevet);
> + ERROR("do not use spaces when tabs expected\n" . $herevet);
> }
>
> # check for RCS/CVS revision markers
-apw
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]CHECKPATCH:fix misleading output on spaces/tabs error
[not found] ` <dc84318c0803192108l28292288yec6f75b79aa65e80@mail.gmail.com>
@ 2008-03-20 4:10 ` Daolong Wang
0 siblings, 0 replies; 3+ messages in thread
From: Daolong Wang @ 2008-03-20 4:10 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: linux-kernel
>
> Except that it says "use tabs not spaces when you should use tabs" and
> doesn't actually tell us what the error was, nor how to correct it. So
> its not really any better than the original (which is also useless in
> this regard).
>
> How about:
>
> "code indent should use tabs where possible"
>
>
My point is the original isn't good.
And about the replacement, that was just my suggestion.
We can choose one that'll please everyone.
In fact, either mine or yours is much better.
Add cc, Sorry for repeating.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-20 4:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-19 3:06 [PATCH]CHECKPATCH:fix misleading output on spaces/tabs error Daolong Wang
2008-03-19 14:13 ` Andy Whitcroft
[not found] ` <dc84318c0803192108l28292288yec6f75b79aa65e80@mail.gmail.com>
2008-03-20 4:10 ` Daolong Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).