[PATCH] Add TREAT_WARNINGS_AS_ERROR option
Gautier <gautier <at> damsy.net>
2015-12-03 20:34:54 GMT
As stated on Github, I would like to add an option behaving similarly
to compilers' -Werror option: any warning generated during Doxygen
execution will abort it immediately.
This option is, in my opinion, valuable to keep documentation up-to-date
with code changes, specially when multiple people are working altogether.
I will not blame anyone to not think all consequence of a code change,
but scripts can help him/her from breaking anything:
* strict compiler options (-Werror, -Wall, etc.) prevents at least some
quick&dirty code and obvious bugs. Compilers will warn beginners about
code which will not work (out of bounds errors, etc.), but most of the
time it's simply about a typo / useless dead code.
* Git hook preventing users from pushing invalid commits . We are
intensively using git submodules for instance - it's quite easy to push
an invalid submodule reference to git:
* if you forgot to run "git submodule update --recursive" after
pulling remote changes following by a "git commit -a", leading to
unwilling submodule downgrading.
* if you're referencing a new submodule revision... which you
forgot to push first!
* To have better code consistency, following a single code style using
clang-format, similarly to what systemd does.
I think that all of us already encountered one or several of these
issues at least once . Having tools checking these errors
automatically allow me not to worry about it anymore.
Our documentation contains nowadays many errors simply because Doxygen