feat(sidekick/rust): Improve generated samples format.#4067
feat(sidekick/rust): Improve generated samples format.#4067amanda-tarafa wants to merge 1 commit intogoogleapis:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4067 +/- ##
=======================================
Coverage 81.93% 81.93%
=======================================
Files 78 78
Lines 6516 6516
=======================================
Hits 5339 5339
Misses 832 832
Partials 345 345 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request improves the formatting of generated Rust code samples, making them more readable by using a multi-line builder pattern. The changes are generally good, but I've found a critical issue where a leftover template tag will cause a syntax error in the generated code. I've also included a suggestion to improve consistency in the new formatting style.
internal/sidekick/rust/templates/common/client_method_samples/builder_fields.mustache
Outdated
Show resolved
Hide resolved
internal/sidekick/rust/templates/common/client_method_samples/builder_fields.mustache
Show resolved
Hide resolved
This approach balances vertical vs. horizontal sample size. And we we don't need the newline-in-comment trick to keep the templates readable.
814f028 to
c8a32e3
Compare
|
Ready for review, generation results can be seen on the second commit of googleapis/google-cloud-rust#4678. @coryan I'm happy to further tweak this or try with |
This approach balances vertical vs. horizontal sample size. And we we don't need the newline-in-comment trick to keep the templates readable.