summaryrefslogtreecommitdiff
path: root/sphinx/cmdline.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-02-28 12:13:55 +0100
committerGeorg Brandl <georg@python.org>2010-02-28 12:13:55 +0100
commit06c5940646d823a28bf550150b206a9674f6c98f (patch)
tree4b888dd99788b090cb5043e4b8f09873a221e589 /sphinx/cmdline.py
parentf060980ceee1883ecaf5704c2b3b8c3b819bcf72 (diff)
downloadsphinx-06c5940646d823a28bf550150b206a9674f6c98f.tar.gz
#282: Added a "nitpicky" mode that emits warnings for all missing references.
It is activated by the ``-n`` command-line switch or the ``nitpicky`` config value.
Diffstat (limited to 'sphinx/cmdline.py')
-rw-r--r--sphinx/cmdline.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py
index bc5aff87..e3e94465 100644
--- a/sphinx/cmdline.py
+++ b/sphinx/cmdline.py
@@ -43,6 +43,7 @@ new and changed files
-C -- use no config file at all, only -D options
-D <setting=value> -- override a setting in configuration
-A <name=value> -- pass a value into the templates, for HTML builder
+ -n -- nit-picky mode, warn about all missing references
-N -- do not do colored output
-q -- no output on stdout, just warnings on stderr
-Q -- no output at all, not even warnings
@@ -61,7 +62,7 @@ def main(argv):
nocolor()
try:
- opts, args = getopt.getopt(argv[1:], 'ab:t:d:c:CD:A:g:NEqQWw:P')
+ opts, args = getopt.getopt(argv[1:], 'ab:t:d:c:CD:A:ng:NEqQWw:P')
allopts = set(opt[0] for opt in opts)
srcdir = confdir = path.abspath(args[0])
if not path.isdir(srcdir):
@@ -142,6 +143,8 @@ def main(argv):
except ValueError:
pass
confoverrides['html_context.%s' % key] = val
+ elif opt == '-n':
+ confoverrides['nitpicky'] = True
elif opt == '-N':
nocolor()
elif opt == '-E':