[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 6/9] scripts/checkpatch: expand pattern for matching makefiles
From: |
Daniel P . Berrangé |
Subject: |
[PATCH v3 6/9] scripts/checkpatch: expand pattern for matching makefiles |
Date: |
Thu, 15 May 2025 14:59:33 +0100 |
The current regex matches Makefile & Makefile.objs, but the latter is
no longer used, and we're missing coverage of Makefile.include and
Makefile.target. Expand the pattern to match any suffix.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4a18daa384..00d7d72e53 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1453,7 +1453,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);
}
--
2.49.0
- [PATCH v3 0/9] scripts/checkpatch: fix SPDX-License-Identifier detection, Daniel P . Berrangé, 2025/05/15
- [PATCH v3 1/9] Revert "scripts: mandate that new files have SPDX-License-Identifier", Daniel P . Berrangé, 2025/05/15
- [PATCH v3 2/9] scripts/checkpatch.pl: fix various indentation mistakes, Daniel P . Berrangé, 2025/05/15
- [PATCH v3 3/9] scripts/checkpatch: introduce tracking of file start/end, Daniel P . Berrangé, 2025/05/15
- [PATCH v3 4/9] scripts/checkpatch: use new hook for ACPI test data check, Daniel P . Berrangé, 2025/05/15
- [PATCH v3 5/9] scripts/checkpatch: use new hook for file permissions check, Daniel P . Berrangé, 2025/05/15
- [PATCH v3 6/9] scripts/checkpatch: expand pattern for matching makefiles,
Daniel P . Berrangé <=
- [PATCH v3 7/9] scripts/checkpatch: use new hook for MAINTAINERS update check, Daniel P . Berrangé, 2025/05/15
- [PATCH v3 8/9] scripts/checkpatch: reimplement mandate for SPDX-License-Identifier, Daniel P . Berrangé, 2025/05/15
- [PATCH v3 9/9] scripts/checkpatch: reject license boilerplate on new files, Daniel P . Berrangé, 2025/05/15