cpitclaudel / alectryon

A collection of tools for writing technical documents that mix Coq code and prose.
MIT License
227 stars 36 forks source link

[question][wish] flag to exit non zero on errors #57

Closed gares closed 3 years ago

gares commented 3 years ago

I get examples/tutorial_coq_elpi_command.v:77: (ERROR/3) ... but it still exists with 0, so I can't easily detect in a makefile if the doc contains errors.

Is there a way? I could not find a flag for controlling this.

cpitclaudel commented 3 years ago

There is a way, ish: add a docutils.conf file and put this in it:

[general]
exit_status_level = 3

This will work, but not for Coq errors; also, it will skip stop producing output files.

Besides exposing this on the command line, I'm working on making it possible to produce output files in addition to reporting an error level, and on making Coq errors also raise an exception.

cpitclaudel commented 3 years ago

OK, all done. Thanks for the request!