Fix dead links

This commit is contained in:
Andreas Dangel
2020-04-11 21:22:35 +02:00
parent ad1e196173
commit a007b0b0cc
2 changed files with 7 additions and 1 deletions

View File

@ -198,5 +198,5 @@ Example:
## Available Report Formats
PMD comes with many different renderers.
All formats are described at [PMD Report formats](pmd_userdos_report_formats.html)
All formats are described at [PMD Report formats](pmd_userdocs_report_formats.html)

View File

@ -177,6 +177,12 @@ public class DeadLinksChecker {
} else {
linkOk = linkTarget.isEmpty() || htmlPages.contains(linkTarget);
}
// maybe a local file
if (!linkOk) {
Path localResource = docsDirectory.resolve(linkTarget);
linkOk = Files.exists(localResource);
}
}
if (!linkOk) {