Post History
The best practice would be that all of the code has to be compiled and potentially verified against some code rules. The way we do this at my work is that all of the examples are tagged in docum...
Answer
#3: Attribution notice added
Source: https://writers.stackexchange.com/a/5304 License name: CC BY-SA 3.0 License URL: https://creativecommons.org/licenses/by-sa/3.0/
#2: Initial revision
The best practice would be that all of the code has to be compiled and potentially verified against some code rules. * * * The way we do this at my work is that all of the examples are tagged in documentation, and then during our nightly builds they all get extracted and compiled. So if someone modifies the interfaces, the nightly build will catch this. To help us with that we have some custom scripts. Effectively different kinds of examples are marked differently, as they will need different wrapping code to be something that compiles. So we have code that is just a little snippet, complete functions, complete classes, and then some full projects. Each gets compiled, so they are at least up to date with the interfaces/functions. We currently do not do anything for specific coding conventions, but if you have the first part working, you can then run some automated style checking. Since we do not do this automatically, we do go thru them every so often by hand.