qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Matheus K. Ferst
Subject: Re: [PATCH] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
Date: Mon, 7 Jun 2021 09:18:10 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]