Add stricter rustdoc requirement

Example code in rustdocs should be error free and not produce warnings
when copy pasted.

The section on rustdocs has been expanded to clarify that example code
should compile without any errors or warnings with the stricter `lint`
that has been added to the justfile.
This commit is contained in:
Jamil Lambert, PhD 2024-10-03 10:10:34 +01:00
parent e8a3c1f01b
commit 2d32e74542
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,8 @@ Prerequisites that a PR must satisfy for merging into the `master` branch:
commits, or, more preferably, as separate commits, so that it's easy to commits, or, more preferably, as separate commits, so that it's easy to
reorder them during review and check that the new tests fail without the new reorder them during review and check that the new tests fail without the new
code); code);
* contain all inline docs for newly introduced API and pass doc tests; * contain all inline docs for newly introduced API and pass doc tests including
running `just lint` without any errors or warnings;
* be based on the recent `master` tip from the original repository at * be based on the recent `master` tip from the original repository at
<https://github.com/rust-bitcoin/rust-bitcoin>. <https://github.com/rust-bitcoin/rust-bitcoin>.
@ -428,6 +429,8 @@ Generally we prefer to have non-panicking APIs but it is impractical in some cas
sure, feel free to ask. If we determine panicking is more practical it must be documented. Internal sure, feel free to ask. If we determine panicking is more practical it must be documented. Internal
panics that could theoretically occur because of bugs in our code must not be documented. panics that could theoretically occur because of bugs in our code must not be documented.
Example code within the rustdocs should compile and lint with `just lint` without any errors or
warnings.
#### Derives #### Derives