Skip to content

Commit

Permalink
Merge rust-bitcoin#3440: Add stricter rustdoc requirement to `CONTRIB…
Browse files Browse the repository at this point in the history
…UTING.md`

2d32e74 Add stricter rustdoc requirement (Jamil Lambert, PhD)

Pull request description:

  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.

  All existing example code in the rustdocs has now been fixed and there are no warnings from unused code, the justfile has been updated to have a stricter `lint` which produces warnings and this addition to `CONTRIBUTING.md` has clarified that new additions should follow these rules.

  Close rust-bitcoin#3362

ACKs for top commit:
  apoelstra:
    ACK 2d32e74 successfully ran local tests
  tcharding:
    ACK 2d32e74

Tree-SHA512: 751475b4b8e9cfa35dba9f9708bb38e099387c24c330e6334fe97170273cfa63e4eb74fad51949d2fdf1dae9fe0dd56b85c043e6d6d4bb450eca35418a711e2b
  • Loading branch information
apoelstra committed Oct 7, 2024
2 parents 31f1a12 + 2d32e74 commit 6892b62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
reorder them during review and check that the new tests fail without the new
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
<https://github.com/rust-bitcoin/rust-bitcoin>.

Expand Down Expand Up @@ -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
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

Expand Down

0 comments on commit 6892b62

Please sign in to comment.