Clean up generated code and implement strip_boilerplate

Remove redundant newlines and duplicate headers from generated files
and prevent the creation of empty sub-modules. Implement the
`strip_boilerplate` function to remove generated headers and
attributes, including a comprehensive test suite.
This commit is contained in:
2026-05-19 23:08:05 -07:00
parent 117cbf812b
commit 7e43e09f66
2 changed files with 68 additions and 10 deletions
-4
View File
@@ -1,6 +1,5 @@
// @generated by protoc-gen-roto — do not edit
#[allow(unused_imports)]
use roto_runtime::{ProtoAccessor, ProtoBuilder, Result, RotoError, read_varint, RepeatedFieldIterator, RotoMessage};
use core::str;
#[cfg(feature = "alloc")]
@@ -407,9 +406,6 @@ impl roto_runtime::RotoMessage for OwnedStreamingResponse {
}
// @generated by protoc-gen-roto — do not edit
#[allow(unused_imports)]
#[cfg(feature = "alloc")]
use tonic::{Request, Response, Status};