Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source

2021-06-07 Thread Alex Bennée


"Matheus K. Ferst"  writes:

> On 20/05/2021 16:51, matheus.fe...@eldorado.org.br wrote:
>> From: Matheus Ferst 
>> 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 
>> ---
>>   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



Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source

2021-06-07 Thread Matheus K. Ferst

On 20/05/2021 16:51, matheus.fe...@eldorado.org.br wrote:

From: Matheus Ferst 

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 
---
  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 
Analista de Software Júnior
Aviso Legal - Disclaimer 



RE: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source

2021-05-21 Thread Luis Fernando Fujita Pires
From: Matheus Ferst 
> 
> 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 
> ---
>  scripts/checkpatch.pl | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Luis Pires 




Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source

2021-05-20 Thread Bruno Piazera Larsen


On 20/05/2021 16:51, matheus.fe...@eldorado.org.br wrote:

From: Matheus Ferst 

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 
---
  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 


Departamento Computação Embarcada
Analista de Software Trainee
Aviso Legal - Disclaimer 


[PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source

2021-05-20 Thread matheus . ferst
From: Matheus Ferst 

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 
---
 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