Hacker News new | past | comments | ask | show | jobs | submit login

I don't think that would fall within the scope of a utility like cog.

I wrote a minimal tool long back which I used to extract parts of code from my test suite as json which I could then use within my documentation generator to embed these snippets as example.

The examples then are guaranteed to be correct because they are quite literally pulled from the project's test suite. The util is written i n ts but should work with any lang. that supports C or Python style comments.

https://github.com/lorefnon/snippet-collector




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: