Skip to content

Commit

Permalink
scripts/documentation-file-ref-check: hint: dash or underline
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Jun 15, 2018
1 parent be600e5 commit e1f319f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/documentation-file-ref-check
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e1f319f

Please sign in to comment.