You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: validate documentation style
In order to validate documentation against style guide conventions
As a documentation writer
I want to run scripts that give me feedback about style conventions
Scenario: Get feedback on documentation buildGiven a Sphinx documentation
And style_guide extension is installed and enabled
When I run sphinx-build
Then I get errors, warnings and notices related to style conventions.
The text was updated successfully, but these errors were encountered:
A question is: where should we plug RST syntax verification?
At http://sphinx.pocoo.org/ext/appapi.html#events, we see that candidate would be doctree-resolved event, because at this stage, we know that documents are valid RST files. If necessary to be plugged before, maybe doctree-read or source-read...
But, it seems that a doctree object doesn't contain the original sourcecode... It contains a reference to the RST document and line, but what about multiline RST constructs? It seems not so easy to get and analyse the original RST sourcecode. Additional parsing may be required.
docutils' RST parser is a state machine. It reads a document line per line and updates states and break conditions (a change in indentation is an example of break condition). Can we plug in to add information about RST markup during parsing? I don't know by now...
Example of useful information could be : for titles (sections), a "is_overlined" boolean and a "overline_char". So that we can easily compare it to best practices.
The text was updated successfully, but these errors were encountered: