doc test due to intended comments
- Dominant language
- Rust
- Stars
- 12.5k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 24
Description
## Bug Report
### Version
tonic 0.10 & tonic-build 0.10
### Platform
Darwin Alexanders-MBP.fritz.box 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:21:34 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8112 arm64
### Description
The copying of comments can (and does) create doc tests that will then fail a `cargo test` command. Easiest reproduction is compile google well known types (empty & duration) which has python code in the comments, but also just the intendation is breaking it:
```rust
/// A generic empty message that you can re-use to avoid defining duplicated
/// empty messages in your APIs. A typical example is to use it as the request
/// or the response type of an API method. For instance:
///
/// service Foo {
/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
/// }
///
/// The JSON representation for `Empty` is empty JSON object `{}`.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Empty {}
}
```
this will execute service Foo as a doc test and fail
Contributor guide
Assessment
This issue has not been assessed yet.