Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source in sample code into Markdown docs automatically #54

Open
mbrukman opened this issue Feb 18, 2019 · 0 comments · May be fixed by #60
Open

Source in sample code into Markdown docs automatically #54

mbrukman opened this issue Feb 18, 2019 · 0 comments · May be fixed by #60
Assignees

Comments

@mbrukman
Copy link
Member

Right now, README.md includes copy-pasted code from sample code in src/example/ tree, but they're not kept in-sync automatically.

Ideally, we would have a process for automatically including code samples, e.g., via some preprocessing since it's probably not possible to do it dynamically, so that we can avoid having to see them diverge, e.g., as can be seen in issue #28 and possibly others.

It will also ensure that the code remains valid, as it will be compiled when it's in the src/example directory, but we cannot compile or test code while it's in the README.md file.

@mbrukman mbrukman self-assigned this May 25, 2019
mbrukman added a commit to mbrukman/cmockery that referenced this issue May 26, 2019
This change add scripts to generate `user_guide.md` automatically from special
markers that are now visible in the source file `user_guide.md.in`. This allows
us to easily keep the source code up-to-date in the docs without having to
manually copy-paste the code, and to ensure that the code we test (in the
example files) is exactly the code that ends up in the documentation.

Closes google#54
@mbrukman mbrukman linked a pull request May 26, 2019 that will close this issue
mbrukman added a commit to mbrukman/cmockery that referenced this issue May 31, 2019
This change add scripts to generate `user_guide.md` automatically from special
markers that are now visible in the source file `user_guide.md.in`. This allows
us to easily keep the source code up-to-date in the docs without having to
manually copy-paste the code, and to ensure that the code we test (in the
example files) is exactly the code that ends up in the documentation.

Closes google#54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant