Closed Meir017 closed 6 months ago
@jnyrup / @dennisdoomen I'd love to get your feedback on this approach maybe a similar approach could be used to generate https://github.com/fluentassertions/fluentassertions/blob/develop/docs/_pages/collections.md and the other assertion examples
That's pretty cool. But I wonder how we would integrate it into the website.
@dennisdoomen a comment-line program that parses the source code could be executed as part of the website generation (the collections.md
file could be generated from multiple tests that compile and pass)
But that would require us to take control of the website generation process that GitHub now takes care off. We have no plans to do that unless somebody else takes the work from our plate.
@dennisdoomen I thought that the docs website is generated using the docfx tool, and then adding a dotnet command to build a different project before building the docs would be simple enough.
If I understand correctly jekyll
is used to generate the docs site (here https://github.com/fluentassertions/fluentassertions/blob/develop/docs/.travis.yml)
Yeah, it's a Jekyll site, but the deploy process is completely handled by GHA. Unless somebody is willing to change that (I don't have the time), your suggestion is not going to be possible.
FYI @dennisdoomen / @jnyrup I'm now able to generate the failure messages as well https://github.com/fluentassertions/fluentassertions.analyzers/blob/main/docs/MsTestAnalyzer.md#scenario-booleanassertistrue
I think this approach will be more reliable than what we have in https://fluentassertions.com/tips/#assert (already out of sync as the subject is now being printed in the error message
for the fluentassertion we should print "Expected actual to be true, but found False."
)
Looks great. What do you have in mind with this?
resolves #274
example of generated docs: