diff options
Diffstat (limited to 'docs/users_guide/flags.py')
-rw-r--r-- | docs/users_guide/flags.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py index 06223b599c..5a1ff51bab 100644 --- a/docs/users_guide/flags.py +++ b/docs/users_guide/flags.py @@ -28,6 +28,7 @@ from docutils import nodes from docutils.parsers.rst import Directive, directives from sphinx import addnodes from sphinx.domains.std import GenericObject +from sphinx.errors import SphinxError ### Settings @@ -125,6 +126,12 @@ class Flag(GenericObject): if 'noindex' in self.options: return + # Validity checking + if 'shortdesc' not in self.options: + raise SphinxError('ghc-flag (%s) directive missing :shortdesc: key' % self.names) + if 'type' not in self.options: + raise SphinxError('ghc-flag (%s) directive missing :type: key' % self.names) + # Set the flag category (default: misc) self.category = 'misc' if not 'category' in self.options or self.options['category'] == '': |