[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 8/8] scripts/checkpatch.pl: process .c.inc and .h.inc files as C s
From: |
Alex Bennée |
Subject: |
[PULL 8/8] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source |
Date: |
Mon, 7 Jun 2021 15:33:03 +0100 |
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>
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>
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.20.1
- [PULL 0/8] testing and misc updates, Alex Bennée, 2021/06/07
- [PULL 1/8] tests/tcg: add a multiarch signals test to stress test signal delivery, Alex Bennée, 2021/06/07
- [PULL 2/8] meson.build: fix cosmetics of compiler display, Alex Bennée, 2021/06/07
- [PULL 4/8] tests/acceptance: tag various arm tests as TCG only, Alex Bennée, 2021/06/07
- [PULL 3/8] tests/tcg/configure.sh: tweak quoting of target_compiler, Alex Bennée, 2021/06/07
- [PULL 5/8] gitlab: work harder to avoid false positives in checkpatch, Alex Bennée, 2021/06/07
- [PULL 6/8] gitlab-ci: Split gprof-gcov job, Alex Bennée, 2021/06/07
- [PULL 8/8] scripts/checkpatch.pl: process .c.inc and .h.inc files as C source,
Alex Bennée <=
- [PULL 7/8] tests/vm: expose --source-path to scripts to find extra files, Alex Bennée, 2021/06/07
- Re: [PULL 0/8] testing and misc updates, Peter Maydell, 2021/06/07