Skip to content

Commit

Permalink
scripts/checkpatch.pl: process .c.inc and .h.inc files as C source
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mferst authored and stsquad committed Jun 7, 2021
1 parent 7bb17a9 commit 7220528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Expand Up @@ -12,7 +12,7 @@
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';

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7220528

Please sign in to comment.