mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
add a dummy builder, for syntax checkers
This commit is contained in:
parent
27be6614f7
commit
59dfb47c1c
1
AUTHORS
1
AUTHORS
@ -24,6 +24,7 @@ Other contributors, listed alphabetically, are:
|
||||
* Charles Duffy -- original graphviz extension
|
||||
* Kevin Dunn -- MathJax extension
|
||||
* Josip Dzolonga -- coverage builder
|
||||
* Buck Evan -- dummy builder
|
||||
* Hernan Grecco -- search improvements
|
||||
* Horst Gutmann -- internationalization support
|
||||
* Martin Hans -- autodoc improvements
|
||||
|
1
CHANGES
1
CHANGES
@ -6,6 +6,7 @@ Incompatible changes
|
||||
|
||||
Features added
|
||||
--------------
|
||||
* Added the ``dummy`` builder: syntax check without output.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
@ -309,6 +309,18 @@ for details.
|
||||
|
||||
.. autoattribute:: supported_image_types
|
||||
|
||||
.. module:: sphinx.builders.dummy
|
||||
.. class:: DummyBuilder
|
||||
|
||||
This builder produces no output. The input is only parsed and checked for
|
||||
consistency. This is useful for linting purposes.
|
||||
|
||||
.. autoattribute:: name
|
||||
|
||||
.. autoattribute:: supported_image_types
|
||||
|
||||
.. versionadded:: 1.4
|
||||
|
||||
.. module:: sphinx.builders.linkcheck
|
||||
.. class:: CheckExternalLinksBuilder
|
||||
|
||||
|
36
sphinx/builders/dummy.py
Normal file
36
sphinx/builders/dummy.py
Normal file
@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
sphinx.builders.dummy
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Do syntax checks, but no writing.
|
||||
|
||||
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
|
||||
from sphinx.builders import Builder
|
||||
|
||||
|
||||
class DummyBuilder(Builder):
|
||||
name = 'dummy'
|
||||
allow_parallel = True
|
||||
|
||||
def init(self):
|
||||
pass
|
||||
|
||||
def get_outdated_docs(self):
|
||||
return self.env.found_docs
|
||||
|
||||
def get_target_uri(self, docname, typ=None):
|
||||
return ''
|
||||
|
||||
def prepare_writing(self, docnames):
|
||||
pass
|
||||
|
||||
def write_doc(self, docname, doctree):
|
||||
pass
|
||||
|
||||
def finish(self):
|
||||
pass
|
Loading…
Reference in New Issue
Block a user