mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-08-27 05:37:16 -05:00
Merge pull request #5193 from tk0miya/5122_nitpicky
BuildDoc: add and pass through nitpicky option
This commit is contained in:
@@ -161,6 +161,7 @@ Features added
|
||||
* Add :confval:`latex_use_xindy` for UTF-8 savvy indexing, defaults to ``True``
|
||||
if :confval:`latex_engine` is ``'xelatex'`` or ``'lualatex'``.
|
||||
* #4976: ``SphinxLoggerAdapter.info()`` now supports ``location`` parameter
|
||||
* #5122: setuptools: support nitpicky option
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
@@ -181,6 +181,14 @@ Options for setuptools integration
|
||||
|
||||
.. versionadded:: 1.3
|
||||
|
||||
.. confval:: nitpicky
|
||||
|
||||
Run in nit-picky mode. Currently, this generates warnings for all missing
|
||||
references. See the config value :confval:`nitpick_ignore` for a way to
|
||||
exclude some references as "known missing".
|
||||
|
||||
.. versionadded:: 1.8
|
||||
|
||||
.. confval:: pdb
|
||||
|
||||
A boolean to configure ``pdb`` on exception. Default is false.
|
||||
|
||||
@@ -28,7 +28,7 @@ from sphinx.util.osutil import abspath
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
from typing import Any, List, Tuple # NOQA
|
||||
from typing import Any, Dict, List, Tuple # NOQA
|
||||
|
||||
|
||||
class BuildDoc(Command):
|
||||
@@ -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
|
||||
@@ -163,7 +165,7 @@ class BuildDoc(Command):
|
||||
status_stream = StringIO()
|
||||
else:
|
||||
status_stream = sys.stdout # type: ignore
|
||||
confoverrides = {}
|
||||
confoverrides = {} # type: Dict[unicode, Any]
|
||||
if self.project:
|
||||
confoverrides['project'] = self.project
|
||||
if self.version:
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user