aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMatheus Ferst <matheus.ferst@eldorado.org.br>2021-05-20 16:51:42 -0300
committerAlex Bennée <alex.bennee@linaro.org>2021-06-07 14:49:30 +0100
commit72205289a0799c6d0a73107198098b830dbea2f9 (patch)
tree8349ec065369e5007353a96d8ea6223697127336 /scripts
parent7bb17a9263665c7cb0b93e6889e66bb62b9f71c1 (diff)
downloadqemu-72205289a0799c6d0a73107198098b830dbea2f9.zip
qemu-72205289a0799c6d0a73107198098b830dbea2f9.tar.gz
qemu-72205289a0799c6d0a73107198098b830dbea2f9.tar.bz2
scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
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> Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Message-Id: <20210520195142.941261-1-matheus.ferst@eldorado.org.br> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3d185cc..bbcd25a 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