From 0a7337f7911db2675cc1534757852e8e5d2fe82f Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 12 Sep 2024 12:12:34 +0100 Subject: [PATCH] docs: Fill out contributor guide --- docs/contributing.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/contributing.md b/docs/contributing.md index 41887bc..560ab3b 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -2,16 +2,34 @@ ## Testing of Reductionist -A majority of the application code in Reductionist is unit tested, and any new code should include unit tests where practical. -Unit tests in Rust code typically reside in the same file as the module being tested. - -The [S3 Active Storage compliance test suite](https://github.com/stackhpc/s3-active-storage-compliance-suite/) should be updated to test any new features added to Reductionist. +Reductionist is tested at various levels. ### Continuous Integration (CI) GitHub Actions is used for CI for pull requests. It checks that the package builds, and passes various checks, unit and integration tests. +### Compliance/integration tests + +The [S3 Active Storage compliance test suite](https://github.com/stackhpc/s3-active-storage-compliance-suite/) should be updated to test any new features added to Reductionist. + +### Code style + +Rust code style is enforced using `cargo fmt`. +This command will modify the source code to resolve any code style issues. +To check for code style issues without making changes, use `cargo fmt -- --check`. + +### Linting + +[Clippy](https://github.com/rust-lang/rust-clippy) is used to lint the source code. +Use `cargo clippy --all-targets -- -D warnings`. + +### Unit tests + +A majority of the application code in Reductionist is unit tested, and any new code should include unit tests where practical. +Unit tests in Rust code typically reside in the same file as the module being tested. +Unit tests can be run using `cargo test`. + ### Benchmarks Benchmark tests in the `benches` directory were created for various modules and used to make performance improvements.