I'm currently inclined to only do the first item above, but I'm open to adding any rules you see as worthwhile--I just don't want to spend much time building rules we don't care about. Will re-negotiate if any given rule proves too hard to implement.
1: Almost all other linting is done later in the Sphinx run, when each doc's DOM is available.
2: i.e., current_indent + INDENT_STEP (2 spaces atm to make longer docs with deeper nesting easier to work with). Since many nested elements can end at once, de-indents can only be validated as some multiple of INDENT_STEP
3: The RST parser requires a blank line after many elements, but it doesn't care if you use more than one.
@zesstra and @amotzkau I'm debating what (if any) source-level style/format1 rules (vertical space, indentation/alignment, line wrap) to enforce.
Here are a few things we could catch by linting the raw source:
I'm currently inclined to only do the first item above, but I'm open to adding any rules you see as worthwhile--I just don't want to spend much time building rules we don't care about. Will re-negotiate if any given rule proves too hard to implement.
1: Almost all other linting is done later in the Sphinx run, when each doc's DOM is available. 2: i.e., current_indent + INDENT_STEP (2 spaces atm to make longer docs with deeper nesting easier to work with). Since many nested elements can end at once, de-indents can only be validated as some multiple of INDENT_STEP 3: The RST parser requires a blank line after many elements, but it doesn't care if you use more than one.