From 3602a5f4a1c901315d0a4e1f6c1aae77ddffbee3 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Tue, 4 Oct 2016 12:35:28 +0200 Subject: [PATCH] [sphinx] Enable '-n' mode automatically; Allow user to ignore things --- templates/sphinx-conf.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/templates/sphinx-conf.py b/templates/sphinx-conf.py index ff69d7e..3bc6bef 100644 --- a/templates/sphinx-conf.py +++ b/templates/sphinx-conf.py @@ -34,6 +34,25 @@ if sphinx.__version__ >= "1.4.1": else: extensions.append('sphinx.ext.pngmath') +# Be picky about warnings +nitpicky = True + +# Ignores stuff we can't easily resolve on other project's sphinx manuals +nitpick_ignore = [] + +# Allows the user to override warnings from a separate file +if os.path.exists('nitpick-exceptions.txt'): + for line in open('nitpick-exceptions.txt'): + if line.strip() == "" or line.startswith("#"): + continue + dtype, target = line.split(None, 1) + target = target.strip() + try: # python 2.x + target = unicode(target) + except NameError: + pass + nitpick_ignore.append((dtype, target)) + # Always includes todos todo_include_todos = True -- GitLab