[all-commits] [llvm/llvm-project] d041ef: [docs] Check for absolute self-documentation links...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Mon Sep 14 21:52:42 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d041ef4182361ca50c6744f8e48854c416e079bd
      https://github.com/llvm/llvm-project/commit/d041ef4182361ca50c6744f8e48854c416e079bd
  Author: Reid Kleckner <rkleckner at nvidia.com>
  Date:   2026-09-14 (Mon, 14 Sep 2026)

  Changed paths:
    M utils/docs/__main__.py
    A utils/docs/llvm_sphinx/ext/absolute_links.py
    A utils/docs/llvm_sphinx/ext/absolute_links_test/conf.py
    A utils/docs/llvm_sphinx/ext/absolute_links_test/index.rst
    A utils/docs/llvm_sphinx/ext/absolute_links_test/markdown.md
    A utils/docs/llvm_sphinx/ext/absolute_links_test/rest.rst
    A utils/docs/llvm_sphinx/ext/absolute_links_test/target.md
    M utils/docs/llvm_sphinx/ext/checks.py

  Log Message:
  -----------
  [docs] Check for absolute self-documentation links (#222504)

Add an opt-in llvm_sphinx check that diagnoses absolute links to
documents in the current Sphinx project. Operate on the parsed doctree
so the check works for both reStructuredText and MyST without flagging
examples in literal blocks.

For example, restoring one absolute link in the LLVM documentation makes
a warnings-as-errors build report:

llvm/docs/ReleaseNotes.md:321: WARNING: absolute URL points to document
    'index' in this Sphinx project; use an internal 'doc' or 'ref' role
    instead: https://llvm.org/docs/ [llvm_sphinx.absolute-doc-link]

Part of #214861

Assisted-by: codex



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list