All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
@ 2021-05-20 19:51 matheus.ferst
  2021-05-20 19:55 ` Bruno Piazera Larsen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: matheus.ferst @ 2021-05-20 19:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Matheus Ferst

From: Matheus Ferst <matheus.ferst@eldorado.org.br>

Change the regex used to determine whether a file should be processed as
C source to include .c.inc and .h.inc extensions.

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3d185cceac..bbcd25ae05 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -12,7 +12,7 @@ use Term::ANSIColor qw(:constants);
 my $P = $0;
 $P =~ s@.*/@@g;
 
-our $SrcFile    = qr{\.(?:h|c|cpp|s|S|pl|py|sh)$};
+our $SrcFile    = qr{\.(?:(h|c)(\.inc)?|cpp|s|S|pl|py|sh)$};
 
 my $V = '0.31';
 
@@ -1671,7 +1671,7 @@ sub process {
 		}
 
 # check we are in a valid C source file if not then ignore this hunk
-		next if ($realfile !~ /\.(h|c|cpp)$/);
+		next if ($realfile !~ /\.((h|c)(\.inc)?|cpp)$/);
 
 # Block comment styles
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
  2021-05-20 19:51 [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source matheus.ferst
@ 2021-05-20 19:55 ` Bruno Piazera Larsen
  2021-05-21 13:19 ` Luis Fernando Fujita Pires
  2021-06-07 12:18 ` Matheus K. Ferst
  2 siblings, 0 replies; 5+ messages in thread
From: Bruno Piazera Larsen @ 2021-05-20 19:55 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]


On 20/05/2021 16:51, matheus.ferst@eldorado.org.br wrote:
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>
> Change the regex used to determine whether a file should be processed as
> C source to include .c.inc and .h.inc extensions.
>
> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> ---
>   scripts/checkpatch.pl | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 3d185cceac..bbcd25ae05 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -12,7 +12,7 @@ use Term::ANSIColor qw(:constants);
>   my $P = $0;
>   $P =~ s@.*/@@g;
>   
> -our $SrcFile    = qr{\.(?:h|c|cpp|s|S|pl|py|sh)$};
> +our $SrcFile    = qr{\.(?:(h|c)(\.inc)?|cpp|s|S|pl|py|sh)$};
>   
>   my $V = '0.31';
>   
> @@ -1671,7 +1671,7 @@ sub process {
>   		}
>   
>   # check we are in a valid C source file if not then ignore this hunk
> -		next if ($realfile !~ /\.(h|c|cpp)$/);
> +		next if ($realfile !~ /\.((h|c)(\.inc)?|cpp)$/);
there's an extra ). shouldn't it be ((h|c(\.inc)?|cpp)$/)?
>   
>   # Block comment styles
>   
-- 
Bruno Piazera Larsen
Instituto de Pesquisas ELDORADO 
<https://www.eldorado.org.br/?utm_campaign=assinatura_de_e-mail&utm_medium=email&utm_source=RD+Station>
Departamento Computação Embarcada
Analista de Software Trainee
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>

[-- Attachment #2: Type: text/html, Size: 2341 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
  2021-05-20 19:51 [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source matheus.ferst
  2021-05-20 19:55 ` Bruno Piazera Larsen
@ 2021-05-21 13:19 ` Luis Fernando Fujita Pires
  2021-06-07 12:18 ` Matheus K. Ferst
  2 siblings, 0 replies; 5+ messages in thread
From: Luis Fernando Fujita Pires @ 2021-05-21 13:19 UTC (permalink / raw)
  To: Matheus Kowalczuk Ferst, qemu-devel; +Cc: qemu-trivial, Matheus Kowalczuk Ferst

From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> 
> Change the regex used to determine whether a file should be processed as C
> source to include .c.inc and .h.inc extensions.
> 
> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> ---
>  scripts/checkpatch.pl | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
  2021-05-20 19:51 [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source matheus.ferst
  2021-05-20 19:55 ` Bruno Piazera Larsen
  2021-05-21 13:19 ` Luis Fernando Fujita Pires
@ 2021-06-07 12:18 ` Matheus K. Ferst
  2021-06-07 13:49   ` Alex Bennée
  2 siblings, 1 reply; 5+ messages in thread
From: Matheus K. Ferst @ 2021-06-07 12:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

On 20/05/2021 16:51, matheus.ferst@eldorado.org.br wrote:
> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
> 
> Change the regex used to determine whether a file should be processed as
> C source to include .c.inc and .h.inc extensions.
> 
> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
> ---
>   scripts/checkpatch.pl | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 3d185cceac..bbcd25ae05 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -12,7 +12,7 @@ use Term::ANSIColor qw(:constants);
>   my $P = $0;
>   $P =~ s@.*/@@g;
>   
> -our $SrcFile    = qr{\.(?:h|c|cpp|s|S|pl|py|sh)$};
> +our $SrcFile    = qr{\.(?:(h|c)(\.inc)?|cpp|s|S|pl|py|sh)$};
>   
>   my $V = '0.31';
>   
> @@ -1671,7 +1671,7 @@ sub process {
>   		}
>   
>   # check we are in a valid C source file if not then ignore this hunk
> -		next if ($realfile !~ /\.(h|c|cpp)$/);
> +		next if ($realfile !~ /\.((h|c)(\.inc)?|cpp)$/);
>   
>   # Block comment styles
>   
> 
ping

-- 
Matheus K. Ferst
Instituto de Pesquisas ELDORADO <http://www.eldorado.org.br/>
Analista de Software Júnior
Aviso Legal - Disclaimer <https://www.eldorado.org.br/disclaimer.html>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
  2021-06-07 12:18 ` Matheus K. Ferst
@ 2021-06-07 13:49   ` Alex Bennée
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Bennée @ 2021-06-07 13:49 UTC (permalink / raw)
  To: Matheus K. Ferst; +Cc: qemu-trivial, qemu-devel


"Matheus K. Ferst" <matheus.ferst@eldorado.org.br> writes:

> On 20/05/2021 16:51, matheus.ferst@eldorado.org.br wrote:
>> From: Matheus Ferst <matheus.ferst@eldorado.org.br>
>> Change the regex used to determine whether a file should be
>> processed as
>> C source to include .c.inc and .h.inc extensions.
>> Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
>> ---
>>   scripts/checkpatch.pl | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 3d185cceac..bbcd25ae05 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -12,7 +12,7 @@ use Term::ANSIColor qw(:constants);
>>   my $P = $0;
>>   $P =~ s@.*/@@g;
>>   -our $SrcFile    = qr{\.(?:h|c|cpp|s|S|pl|py|sh)$};
>> +our $SrcFile    = qr{\.(?:(h|c)(\.inc)?|cpp|s|S|pl|py|sh)$};
>>     my $V = '0.31';
>>   @@ -1671,7 +1671,7 @@ sub process {
>>   		}
>>     # check we are in a valid C source file if not then ignore this
>> hunk
>> -		next if ($realfile !~ /\.(h|c|cpp)$/);
>> +		next if ($realfile !~ /\.((h|c)(\.inc)?|cpp)$/);
>>     # Block comment styles
>>   
> ping

Seeing as checkpatch.pl is in it's own odd fixes silo I might as well
pick it up for my PR that I'm rolling.

Queued to pr/070621-testing-updates-1, thanks.

-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-07 13:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 19:51 [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source matheus.ferst
2021-05-20 19:55 ` Bruno Piazera Larsen
2021-05-21 13:19 ` Luis Fernando Fujita Pires
2021-06-07 12:18 ` Matheus K. Ferst
2021-06-07 13:49   ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.