summaryrefslogtreecommitdiffstats
path: root/scripts/documentation-file-ref-check
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-06-14 15:14:54 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-06-15 23:10:01 +0200
commite1f319fe4d537da79691f1a1da7a20147de33047 (patch)
treedd8f4d1e0906fc64c327a00f19b0fb05008cd653 /scripts/documentation-file-ref-check
parentscripts/documentation-file-ref-check: add a fix logic for DT (diff)
downloadlinux-e1f319fe4d537da79691f1a1da7a20147de33047.tar.xz
linux-e1f319fe4d537da79691f1a1da7a20147de33047.zip
scripts/documentation-file-ref-check: hint: dash or underline
Sometimes, people use dash instead of underline or vice-versa. Try to autocorrect it. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to '')
-rwxr-xr-xscripts/documentation-file-ref-check6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check
index c8bc1c1c1d6e..d132f756d31d 100755
--- a/scripts/documentation-file-ref-check
+++ b/scripts/documentation-file-ref-check
@@ -104,6 +104,12 @@ foreach my $ref (keys %broken_ref) {
$f=qx(find . -iname $new) if ($new);
}
+ # usual reason for breakage: use dash or underline
+ if (!$f) {
+ $new =~ s/[-_]/[-_]/g;
+ $f=qx(find . -iname $new) if ($new);
+ }
+
# Wild guess: seek for the same name on another place
if (!$f) {
$f = qx(find . -iname $new) if ($new);