]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
scripts/checkpatch: expand pattern for matching makefiles
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 15 May 2025 12:57:45 +0000 (13:57 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 22 May 2025 10:24:41 +0000 (11:24 +0100)
The current regex matches Makefile & Makefile.objs, but the latter is
no longer used, anjd we're missing coverage of Makefile.include and
Makefile.target. Expand the pattern to match any suffix.

Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
scripts/checkpatch.pl

index 881dcac29bdb12ed2227fd9c12e64e5603e6d0f7..82ec71e05d954cce4899814e7fc8bbd30124c05b 100755 (executable)
@@ -1454,7 +1454,7 @@ sub process_start_of_file {
                my $permhere = $fileinfo->{linestart} . "FILE: " .
                        $fileinfo->{filenew} . "\n";
                if ($fileinfo->{filenew} =~
-                   /(\bMakefile(?:\.objs)?|\.(c|cc|cpp|h|mak|s|S))$/) {
+                   /(\bMakefile.*|\.(c|cc|cpp|h|mak|s|S))$/) {
                        ERROR("do not set execute permissions for source " .
                              "files\n" . $permhere);
                }