-
Notifications
You must be signed in to change notification settings - Fork 72
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
AsciiDoc code snippets in documentation #335
Comments
To copy my concerns from the draft into the discussion:
|
We could use Java::Geci to format code snippets before they are inserted into the documentation. Maybe we can tell spotless to consider snippets as special cases. Maybe AsciiDoc supports reformatting? I'll look into our options and get back to you on that.
Yes, this is certainly a drawback. Some ideas about what we could do to counteract this problem:
We might decide that the fruit ain't worth the squeeze, but we won't know for sure unless we try squeezing first. |
@Michael1993 Could you summarize your yesterdays question and the answer to it please. |
The question was: "How should we proceed with this, without polluting our tests with 'noisy demo tests'?". The answer is basically what Nicolai wrote on the PR. @nipafx wrote on Sep 29:
We agreed that this was a good approach and we should play around with it in a PR. I'll go ahead when I have the time. |
Code snippets in the documentation files in `docs` are just text and thus run the risk of getting outdated when APIs evolve or implementations change their behavior. To address that, we now use Asciidoc's capability to include tagged regions from external files[1] that are compiled and tested by the build. These files' primary purpose is to demonstrate features (not to test them) and so they are placed in a new source set `src/demojava`. [1]: https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/ Related to junit-pioneer/junit-pioneer.github.io#33 Closes: #335 PR: #334
Demonstrated in #334, we can use a neat built-in feature of AsciiDoc to include live code examples in our
.adoc
documentation.The proper way to utilize this feature warrants a discussion.
The text was updated successfully, but these errors were encountered: