diff mbox series

[1/8] conf.py: add linkcheck builder exclusions

Message ID 20260710-linkcheck-v1-1-999168371d5e@bootlin.com
State New
Headers show
Series Fix broken links | expand

Commit Message

Antonin Godard July 10, 2026, 2:46 p.m. UTC
The linkcheck builder can be used to scout for broken links. By looking at
the output of:

  grep -E -r --no-filename -o 'href="http.://[^/"]+' | sort | uniq -c | sort -nr

from the HTML output directory, exclude links that are too frequent.
Also remove docs.yoctoproject.org links are those should already be
validated when building the documentation.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/conf.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Quentin Schulz July 10, 2026, 3:09 p.m. UTC | #1
Hi Antonin,

On 7/10/26 4:46 PM, Antonin Godard via lists.yoctoproject.org wrote:
> The linkcheck builder can be used to scout for broken links. By looking at
> the output of:
> 
>    grep -E -r --no-filename -o 'href="http.://[^/"]+' | sort | uniq -c | sort -nr
> 
> from the HTML output directory, exclude links that are too frequent.

Because they are too frequent it's impossible they are broken? 
Considering you fix links that are in this list later in this series, I 
don't think this holds. At least provide a proper justification because 
"too frequent" doesn't make sense.

Cheers,
Quentin
diff mbox series

Patch

diff --git a/documentation/conf.py b/documentation/conf.py
index 7b201ebd6..aff01c1ed 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -143,6 +143,19 @@  suppress_warnings = ['epub.unknown_project_files']
 # sphinx-copybutton configuration
 copybutton_prompt_text = "$ "
 
+# When using the linkcheck builder, ignore the following links which are too
+# present in the docs, and self-references to yocto-docs which are already
+# checked.
+linkcheck_ignore = [
+    r'https?://nvd\.nist\.gov.*',
+    r'https?://docs\.yoctoproject\.org.*',
+    r'https?://git\.yoctoproject\.org.*',
+    r'https?://git\.openembedded\.org.*',
+    r'https?://downloads\.yoctoproject\.org.*',
+    r'https?://mirrors\.kernel\.org.*',
+    r'https?://mirrors\.edge\.kernel\.org.*'
+]
+
 # -- Options for HTML output -------------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for