Skip to content

nim doc/rst2html output should show parsing warnings in generated html #17324

@timotheecour

Description

@timotheecour

/cc @a-mr
it's too easy to forget about warnings that occur during nim doc generation, because nim's CI (or other repo's CI) typically don't use --warningAsError:listOfRstSpecificWarnings

we should show warnings in generated html to surface those so they're more likely to be fixed (but possibly we can have an option to opt out of this)

Example

for example #17257 introduces a warning, but this warning only shows during compilation, not in generated html output

Current Output

see https://github.com/nim-lang/Nim/pull/17257/files/aa7447358f537d19c15514c6cf59bffd30ded7ed#diff-938c08f65d28c56eec8938ee99be817392a4fd1282fcd9edc165a935459e4db0

which could've gone completely un-noticed in a real project and would've been bad (for obvious reasons)

Expected Output

we should do like rst2html.py, and show a parsing warning in generated html, so it's obvious that something went wrong and it won't go un-noticed, eg:

echo ':code:`\x`' | rst2html.py > /tmp/z01.html

the html shows:

<stdin>:1: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.

image

Additional Information

1.5.1 2f213db

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentation GenerationRelated to documentation generation (but not content).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions