Sitelet https://github.com/Forostovec/rust-bitcoin/commit/2d32e74542b927d583a4f14eae3cb150e993d80a
Skip to content

Commit 2d32e74

Browse files
committed
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.
1 parent e8a3c1f commit 2d32e74

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ Prerequisites that a PR must satisfy for merging into the `master` branch:
110110
commits, or, more preferably, as separate commits, so that it's easy to
111111
reorder them during review and check that the new tests fail without the new
112112
code);
113-
* contain all inline docs for newly introduced API and pass doc tests;
113+
* contain all inline docs for newly introduced API and pass doc tests including
114+
running `just lint` without any errors or warnings;
114115
* be based on the recent `master` tip from the original repository at
115116
<https://github.com/rust-bitcoin/rust-bitcoin>.
116117

@@ -428,6 +429,8 @@ Generally we prefer to have non-panicking APIs but it is impractical in some cas
428429
sure, feel free to ask. If we determine panicking is more practical it must be documented. Internal
429430
panics that could theoretically occur because of bugs in our code must not be documented.
430431

432+
Example code within the rustdocs should compile and lint with `just lint` without any errors or
433+
warnings.
431434

432435
#### Derives
433436

0 commit comments

Comments
 (0)