checkpatch: MAINTAINERS: warn on missing paths
PATCH 1/1 checkpatch: MAINTAINERS: warn on missing paths
Warn when F: or X: entries point to nonexistent files or patterns. There have been instances of typos in file entries in the past, and this patch helps prevents that.
--- scripts/checkpatch.pl | 9 +++++++++ 1 file changed, 9 insertions(+)
scripts/checkpatch.pl +9 -0
@@ -3750,6 +3750,15 @@ sub process { } } } +# check MAINTAINERS file entry for file existence + if ($rawline =~ /^\+[FX]:\s*+(.*)/) { + my $entry = $1; + my @matches = glob($entry); + if (!@matches) { + WARN("MAINTAINERS_FILE_MISSING", + "MAINTAINERS file entry references nonexistent file: '$entry'\n" . $herecurr); + } + } } # check for DT compatible documentation
---
base-commit: 979c294509f9248fe1e7c358d582fb37dd5ca12d
change-id: 20260712-chkpatch-file-entries-90ae03915cde
Best regards,
Signature · 1 line
Eugene Mavick <[email protected]>
Quoted 3 lines · Eugene Mavick
Warn when F: or X: entries point to nonexistent files or patterns. There have been instances of typos in file entries in the past, and this patch helps prevents that.
Nack.
There's already a self test for that.
Joe Perches
maintainerQuoted 4 lines · Eugene Mavick
```
Warn when F: or X: entries point to nonexistent files or patterns. There have been instances of typos in file entries in the past, and this patch helps prevents that.
Just fyi:
if you care to do something about the missing MAINTAINER file patterns
$ ./scripts/get_maintainer.pl --self-test=patterns ./MAINTAINERS:2764: warning: no file matches F: arch/arm/mach-ep93xx/ts72xx.c ./MAINTAINERS:7654: warning: no file matches F: include/linux/dma-buf/ ./MAINTAINERS:7897: warning: no file matches F: include/linux/drbd* ./MAINTAINERS:10017: warning: no file matches F: include/linux/fs_types.h ./MAINTAINERS:12694: warning: no file matches F: drivers/gpu/drm/ci/xfails/powervr* ./MAINTAINERS:16731: warning: no file matches F: Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt ./MAINTAINERS:21913: warning: no file matches F: sound/arm/pxa* ./MAINTAINERS:22364: warning: no file matches F: include/dt-bindings/media/*qcom* ./MAINTAINERS:25130: warning: no file matches F: tools/testing/selftests/net/so_txtime.c ./MAINTAINERS:25342: warning: no file matches F: Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml ./MAINTAINERS:28376: warning: no file matches F: include/linux/vsi-iommu.h
Quoted 10 lines · Joe Perches
Quoted 4 lines · Eugene Mavick
```
Warn when F: or X: entries point to nonexistent files or patterns. There have been instances of typos in file entries in the past, and this patch helps prevents that.Just fyi:
if you care to do something about the missing MAINTAINER file patterns
Quoted 12 lines
$ ./scripts/get_maintainer.pl --self-test=patterns ./MAINTAINERS:2764: warning: no file matches F: arch/arm/mach-ep93xx/ts72xx.c ./MAINTAINERS:7654: warning: no file matches F: include/linux/dma-buf/ ./MAINTAINERS:7897: warning: no file matches F: include/linux/drbd* ./MAINTAINERS:10017: warning: no file matches F: include/linux/fs_types.h ./MAINTAINERS:12694: warning: no file matches F: drivers/gpu/drm/ci/xfails/powervr* ./MAINTAINERS:16731: warning: no file matches F: Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt ./MAINTAINERS:21913: warning: no file matches F: sound/arm/pxa* ./MAINTAINERS:22364: warning: no file matches F: include/dt-bindings/media/*qcom* ./MAINTAINERS:25130: warning: no file matches F: tools/testing/selftests/net/so_txtime.c ./MAINTAINERS:25342: warning: no file matches F: Documentation/devicetree/bindings/media/i2c/sony,imx678.yaml ./MAINTAINERS:28376: warning: no file matches F: include/linux/vsi-iommu.h
Thanks, here's the patch:
https://lore.kernel.org/all/[email protected]/