diff mbox

checkpatch.pl: don't complain about old lines with tabs

Message ID AANLkTimcaCvEM_87PfFhR39h139CyeU=kJ4SYtqx_V4C@mail.gmail.com
State New
Headers show

Commit Message

Blue Swirl Feb. 3, 2011, 5:55 p.m. UTC
Don't complain when the patch includes lines with tabs
only in the hunk's untouched context.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 scripts/checkpatch.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Jan Kiszka Feb. 3, 2011, 9:50 p.m. UTC | #1
On 2011-02-03 18:55, Blue Swirl wrote:
> Don't complain when the patch includes lines with tabs
> only in the hunk's untouched context.
> 
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
>  scripts/checkpatch.pl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 4fa06c0..075b614 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1495,7 +1495,7 @@ sub process {
>  		next if ($realfile !~ /\.(h|c|pl)$/);
> 
>  # in QEMU, no tabs are allowed
> -		if ($rawline =~ /\t/) {
> +		if ($rawline =~ /^\+.*\t/) {
>  			my $herevet = "$here\n" . cat_vet($rawline) . "\n";
>  			ERROR("code indent should never use tabs\n" . $herevet);
>  			$rpt_cleaners = 1;
> -- 1.6.2.4

Works perfectly now.

Thanks,
Jan
diff mbox

Patch

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4fa06c0..075b614 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1495,7 +1495,7 @@  sub process {
 		next if ($realfile !~ /\.(h|c|pl)$/);

 # in QEMU, no tabs are allowed
-		if ($rawline =~ /\t/) {
+		if ($rawline =~ /^\+.*\t/) {
 			my $herevet = "$here\n" . cat_vet($rawline) . "\n";
 			ERROR("code indent should never use tabs\n" . $herevet);
 			$rpt_cleaners = 1;