From 6cc9559fd1cfbdc8f1cc974a5d0804092cbc25e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Sun, 17 Nov 2024 21:38:34 +0100 Subject: [PATCH] Update to linkchecker (#346) * Don't check gazebosim.org 404 error * use linkcheck_anchors_ignore_for_url for github instead of ignoring it --- conf.py | 8 ++++++++ make_help_scripts/check_links.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 6db9c4befc..62b3d54ee0 100644 --- a/conf.py +++ b/conf.py @@ -172,6 +172,14 @@ github_url = "https://github.com/ros-controls/control.ros.org" +# -- linkchecker options ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#filtering +linkcheck_anchors_ignore_for_url = [ + 'https://github.com/', + 'https://index.ros.org/' + ] +linkcheck_ignore = [r'https://gazebosim.org/home'] + # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. diff --git a/make_help_scripts/check_links.py b/make_help_scripts/check_links.py index 0fbe18d600..d6a1d9ca7a 100755 --- a/make_help_scripts/check_links.py +++ b/make_help_scripts/check_links.py @@ -50,7 +50,7 @@ def main(): # Check for broken links with open(LOGFILE, "r") as logfile: broken_links = [ - line for line in logfile if "broken" in line and "github" not in line and "vimeo" not in line] + line for line in logfile if 'broken' in line] if broken_links: num_broken = len(broken_links)