-
Notifications
You must be signed in to change notification settings - Fork 480
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
Exit code for makedocs is 0 when doctest error #1504
Comments
Try passing |
Oh... I thought I scrolled through all options and didn't find one, but that seems exactly like what it want. Thanks! |
I realised this also did one more thing that I didn't notice at first, it seems to make what was previously warnings result in errors. I know I should probably fix the warnings instead of ignoring them, but is there any way to have that errors stop the program but warnings are still allowed? |
Depending on what errors you're getting, you might be able to disable them by passing |
Yeah, I did find that when I looked through and it allows me to do what I originally asked for. I don't care too much about loosing the warnings, but it can still be nice to see them. So it seems to me it would be reasonable to have a flag like strict but the only thing it does is that on error it gives an exit code of 1 instead of 0 so that we can use makedocs doctest with CI but still print everything including warnings as normal. But that may be just me, and I'm also fine with the solution as it is now. Just giving my two cents. |
It should be relatively easy to generalize
The exit code is caused by |
Yeah, I guessed that was how it worked but the
That sound like a nice solution to me. So you would have |
I'll close this in favour of #1686. |
It seems like the exit code for
julia -e 'using Documenter, Example; makedocs(modules=[Example])'
is 0 even when there are errors in the doctests whilejulia -e 'using Documenter, Example; doctest(Example)
will have an exit code based on if the tests errored or not.This could be nice to use in a CI chain. Currently I first run
doctest
and thenmake.jl
to make sure I catch errors, but would be nice if the doctest that is run while making the docs could be used to check for errors, skipping one unnecessary run.The text was updated successfully, but these errors were encountered: