From: Mauro Carvalho Chehab Date: Thu, 14 Jun 2018 13:14:54 +0000 (-0300) Subject: scripts/documentation-file-ref-check: hint: dash or underline X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e1f319fe4d537da79691f1a1da7a20147de33047;p=linux.git 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 Acked-by: Jonathan Corbet --- diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check index c8bc1c1c1d6e2..d132f756d31d4 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);