[RFC,04/10] docs/conf.py: Ignore some missing references in nitpick mode

Message ID 20190521122519.12573-5-peter.maydell@linaro.org
State New
Headers show
Series
  • Add kernel-doc support to our Sphinx setup
Related show

Commit Message

Peter Maydell May 21, 2019, 12:25 p.m.
We enable Sphinx's 'nitpick' mode via the command line -n switch, which
means it warns about references to things it doesn't know about. Add
a whitelist of expected-not-to-be-present types, to avoid false
positives when C function prototypes use standard integer types.

If this whitelist gets too long and unmanageable we might be better
off switching to non-nitpick mode instead.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 docs/conf.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
2.20.1

Patch

diff --git a/docs/conf.py b/docs/conf.py
index 9109edbcb97..388299fb25b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -114,6 +114,17 @@  todo_include_todos = False
 # with "option::" in the document being processed. Turn that off.
 suppress_warnings = ["ref.option"]
 
+nitpick_ignore = [
+    ("c:type", "int8_t"),
+    ("c:type", "int16_t"),
+    ("c:type", "int32_t"),
+    ("c:type", "int64_t"),
+    ("c:type", "uint8_t"),
+    ("c:type", "uint16_t"),
+    ("c:type", "uint32_t"),
+    ("c:type", "uint64_t"),
+]
+
 # -- Options for HTML output ----------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for