Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
timotheecour opened this issue Mar 10, 2021 · 1 comment
Open
Labels
Documentation Generation Related to documentation generation (but not content).

Comments

@timotheecour
Copy link
Member

timotheecour commented Mar 10, 2021

/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

@timotheecour timotheecour added the Documentation Generation Related to documentation generation (but not content). label Mar 10, 2021
@Araq
Copy link
Member

Araq commented Mar 12, 2021

That's worse than simply making the build fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Generation Related to documentation generation (but not content).
Projects
None yet
Development

No branches or pull requests

2 participants