From 2d32e74542b927d583a4f14eae3cb150e993d80a Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Thu, 3 Oct 2024 10:10:34 +0100 Subject: [PATCH] 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. --- CONTRIBUTING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43c38cb2a..2472e0260 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 . @@ -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