summaryrefslogtreecommitdiff
path: root/sphinx/setup_command.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2018-06-25 08:03:05 +0200
committerDaniel Hahler <git@thequod.de>2018-06-25 08:04:07 +0200
commit4cd90a644a30e14ba4a9138f634f90b448c05cff (patch)
tree7cf04eb9736b63fb6b3730a5070667c9969cf012 /sphinx/setup_command.py
parente1201f277902df12ff5fca1e2a63a73bbae58296 (diff)
downloadsphinx-git-4cd90a644a30e14ba4a9138f634f90b448c05cff.tar.gz
BuildDoc: add and pass through nitpicky option
This allows for using e.g. `tox -e docs -- -n` with Sphinx's own `build_sphinx` distutils command.
Diffstat (limited to 'sphinx/setup_command.py')
-rw-r--r--sphinx/setup_command.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py
index c54179227..c3957fefc 100644
--- a/sphinx/setup_command.py
+++ b/sphinx/setup_command.py
@@ -87,9 +87,10 @@ class BuildDoc(Command):
('link-index', 'i', 'Link index.html to the master doc'),
('copyright', None, 'The copyright string'),
('pdb', None, 'Start pdb on exception'),
+ ('nitpicky', 'n', 'nit-picky mode, warn about all missing references'),
]
boolean_options = ['fresh-env', 'all-files', 'warning-is-error',
- 'link-index']
+ 'link-index', 'nitpicky']
def initialize_options(self):
# type: () -> None
@@ -107,6 +108,7 @@ class BuildDoc(Command):
self.copyright = ''
self.verbosity = 0
self.traceback = False
+ self.nitpicky = False
def _guess_source_dir(self):
# type: () -> unicode
@@ -174,6 +176,8 @@ class BuildDoc(Command):
confoverrides['today'] = self.today
if self.copyright:
confoverrides['copyright'] = self.copyright
+ if self.nitpicky:
+ confoverrides['nitpicky'] = self.nitpicky
for builder, builder_target_dir in self.builder_target_dirs:
app = None