# Triage Sphinx unresolved references with nitpicky builds

Canonical: https://githtml.com/guides/sphinx-nitpicky-warning-triage
Published: 2026-11-23
Publisher: WaveTech LLC / gitHtml

Run a local Sphinx build with nitpicky reference checking and warnings treated as failures, then classify unresolved targets before changing configuration. Fix incorrect names and missing documentation first. Use narrow exceptions only when the reference is intentionally unresolvable, and keep a reason so future maintainers do not inherit a silent blanket suppression.

## Establish a clean diagnostic baseline

Record the installed Sphinx version, extensions, and exact build command. A project with many existing warnings needs a triage list, not a declaration that the entire documentation set is broken. Group findings by cause: misspelled local targets, omitted API objects, external inventory issues, or intentional references to material outside the build. Preserve the original warning text and source location. Do not begin by adding broad ignore patterns. Those can hide new errors introduced later and make a successful exit code meaningless. Choose a small representative section to repair first so the team understands the pattern before applying wider changes.

## Repair the source relationship before adding exceptions

The sample command enables nitpicky checking and makes warnings affect the result. Confirm the options against the installed version and use a suitable local output directory. For each target, ask whether the source meant a semantic cross-reference or simply a literal identifier. A code-styled token may be more appropriate when no navigable definition exists. When a true reference is intended, correct the role, target name, or documented object. If an exception is justified, scope it to the specific warning and target according to the current configuration contract. Keep the explanatory comment near the exception so its purpose survives future cleanup.

````sh
sphinx-build --version
sphinx-build -n -W -b html docs docs/_build/reference-review
````

## Check that a clean build still teaches the right thing

After diagnostics are resolved, inspect the affected pages and follow their links. Replacing every reference with plain text can produce a clean log while making the guide less useful, so review the reader experience as well as the exit status. Keep a record of intentionally unlinked terms and revisit them when the API or external documentation changes. Repeat the check after extension upgrades because target discovery may change. Local reference validation is one layer of review; it does not establish that descriptions, examples, or supported-version claims are correct. Pair it with a focused content review of the repaired sections. Review exception lists periodically for targets that now resolve correctly. Keeping obsolete ignores indefinitely obscures the project's real documentation gaps and makes future diagnostic changes harder to interpret.

1. Capture version, command, source locations, and diagnostic categories before editing.
2. Correct reference intent and target names before adding ignores.
3. Keep any exception specific and explain the reason beside it.
4. Inspect repaired pages and links after the local build passes.

## Sources and further reading

- [Sphinx configuration](https://www.sphinx-doc.org/en/master/usage/configuration.html)
- [Sphinx build command](https://www.sphinx-doc.org/en/master/man/sphinx-build.html)

## Related guides

- [Check an Astro Starlight documentation build locally](https://githtml.com/guides/starlight-local-build-content-validation)
- [Organize Starlight sidebars around reader tasks](https://githtml.com/guides/starlight-sidebar-order-and-groups)
- [Check VitePress base paths before serving docs in a subdirectory](https://githtml.com/guides/vitepress-base-path-subdirectory-check)
- [Build and inspect a VitePress documentation artifact locally](https://githtml.com/guides/vitepress-local-production-artifact-review)

Editorial approach: https://githtml.com/guides/about
