mirror of
https://github.com/xemu-project/xemu.git
synced 2025-01-24 04:45:09 +00:00
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>
This commit is contained in:
parent
7bb17a9263
commit
72205289a0
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user