RDocLinkChecker

A gem to find broken links in HTML files generated by Ruby RDoc.

Reports a link as broken if:

  • The target page given by +href+ is not found.

  • The target page is found, but the fragment given by +href+ is not a link target (element with attribute id) on that page; this usually causes a browser to open at the top of the page instead of at the given fragment.

    Some browsers are forgiving, and will open the target page at a link target similar to the given fragment; for example, fragment #bar may be opened at an element with id foobar.

See the help text.

Note: An RDoc bug that was fixed recently (PR ruby/rdoc#1002) caused many (make that many, many) broken links TOC section https://docs.ruby-lang.org/en/master/table_of_contents.html#classes. Unless you have a recent Ruby version installed (one that has the bug fix), the RDocLinkChecker will find and report all those broken links.

Workaround: Use option --no_toc, which suppresses checking for those links.