From 8901a894e39378e266efdbce2b5b53d8056a8339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gonz=C3=A1lez?= Date: Tue, 12 Sep 2023 16:04:53 +0100 Subject: [PATCH] Be more explicit about the code style of the project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás González --- src/contributing/pr_checklist.md | 7 +++++++ src/parsec_service/tests/README.md | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/contributing/pr_checklist.md b/src/contributing/pr_checklist.md index cd434251..d039c16e 100644 --- a/src/contributing/pr_checklist.md +++ b/src/contributing/pr_checklist.md @@ -18,6 +18,13 @@ Buffers should be zeroed out after usage if they contain any sensitive data. Logs should not contain sensitive data, and should only present detailed data and error information (such as stack traces) if configured so. +Parsec should follow the [Rust Style +Guide](https://doc.rust-lang.org/nightly/style-guide/#rust-style-guide) and [Rust official +lints](https://rust-lang.github.io/rust-clippy/master/index.html), both of which are enforced by the +tools mentioned in the [How to test +Parsec](https://parallaxsecond.github.io/parsec-book/parsec_service/tests/index.html) section, on +static checks. + New functionality is properly tested. ## Threat model diff --git a/src/parsec_service/tests/README.md b/src/parsec_service/tests/README.md index 8013ed6d..93331ed6 100644 --- a/src/parsec_service/tests/README.md +++ b/src/parsec_service/tests/README.md @@ -16,9 +16,10 @@ multithreaded client. Valid requests are sent intermittently so as to check that still up and working correctly. The `ci.sh` script executes all tests and is used on the CI. -[`rustfmt`](https://github.com/rust-lang/rustfmt) and -[`clippy`](https://github.com/rust-lang/rust-clippy) are needed for code formatting and static -checks. + +Parsec's code style is enforced by [`rustfmt`](https://github.com/rust-lang/rustfmt) and +[`clippy`](https://github.com/rust-lang/rust-clippy), which are needed for code formatting and +static lint checks respectively. A documentation style is also enforced by `cargo test --doc`. You can see a (partial) code coverage figure [here](https://app.codecov.io/gh/parallaxsecond/parsec) - partial because only a subset of the tests can be run with the code coverage instrumentation