verify that command line examples in the readme work after code changes

277 Views Asked by At

In the context of a Java/Maven/Markdown/Git project - what's the most elegant way to break the build if command lines featured in the project readme file stopped working after the code change.

The one I can think of is have an ant task that would grep the README.md for specific markers, extract the code, and execute it. Wondering if someone has solved the subject problem in a more elegant way.

The reason is to prevent the examples in the documentation from going stale.

0

There are 0 best solutions below