From b4d4ee4488f04264178a259d13a31463cbc83cab Mon Sep 17 00:00:00 2001 From: Ty Schlich Date: Tue, 14 Oct 2025 14:45:37 +0000 Subject: [PATCH 1/3] docs: improve CONTRIBUTING.md with stricter CI check commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the pre-submission checklist to match CI requirements more closely: - Added --check flag to cargo fmt to verify formatting without modifying files - Added -D warnings flag to cargo clippy to treat warnings as errors - Added --all flag to cargo test to run tests across all workspace members - Added lockfile check command (cargo check --locked) - Included note about CI testing with multiple feature combinations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CONTRIBUTING.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9d930baa..80d763d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,17 +37,25 @@ Before submitting a PR make sure to run: - for formatting ```shell - cargo fmt --all + cargo fmt --all -- --check ``` -- the clippy lints +- the clippy lints (with warnings treated as errors) ```shell - cargo clippy + cargo clippy --all-targets --all -- -D warnings ``` - the test suite ```shell - cargo test + cargo test --all ``` + +- the lockfile check + + ```shell + cargo check --locked --all-targets --all + ``` + +Note: CI runs these checks across multiple feature combinations (`bashisms`, `sqlite`, `external_printer`, etc.), so you may want to test with the features relevant to your changes using the `--features` flag. From 8b769ff293cb9d487fb968926930ae07075d5723 Mon Sep 17 00:00:00 2001 From: Ty Schlichenmeyer Date: Tue, 21 Oct 2025 16:39:40 -0500 Subject: [PATCH 2/3] Remove unnecessary check after `cargo fmt` instructions Co-authored-by: Stefan Holderbach --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 80d763d4..450bd671 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,7 +37,7 @@ Before submitting a PR make sure to run: - for formatting ```shell - cargo fmt --all -- --check + cargo fmt --all ``` - the clippy lints (with warnings treated as errors) From 7e20b25f421227709e80544bd2ca92926b3f36a6 Mon Sep 17 00:00:00 2001 From: Ty Schlich Date: Wed, 22 Oct 2025 10:01:57 +0000 Subject: [PATCH 3/3] docs: clarify CI checks and update formatting/lint/test commands in CONTRIBUTING.md Rework the "To make the CI gods happy" section to mirror CI behavior: add explanatory preamble and section headers, update the Clippy command to use `--locked --all-targets --all-features`, switch tests to the `cargo nextest run --all --all-features` invocation, and add notes about the flags and nextest runner. --- CONTRIBUTING.md | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 450bd671..dcc52759 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,30 +32,39 @@ We follow the standard rust formatting style and conventions suggested by [clipp ### To make the CI gods happy -Before submitting a PR make sure to run: +> The commands below reflect what CI runs. Not all flags are always necessary for local development (e.g. feel free to omit `--all-features` or `--all-targets` during iteration), but running these exact commands before opening a PR ensures you match CI behavior. -- for formatting +Before opening a PR, run these locally: + +- Format: ```shell cargo fmt --all ``` -- the clippy lints (with warnings treated as errors) + > `--all` formats all packages in the workspace. + +- Lint (Clippy): ```shell - cargo clippy --all-targets --all -- -D warnings + cargo clippy --locked --all-targets --all-features ``` -- the test suite + > `--all-targets` checks lib, bins, tests, examples, and benches. + > + > `--all-features` enables all optional features. + > + > `--locked` ensures `Cargo.lock` is in sync with `Cargo.toml`. + + > Note: CI treats Clippy warnings as errors. - ```shell - cargo test --all - ``` -- the lockfile check + +- Tests: + +> CI uses [cargo-nextest](https://nexte.st/) for its test runner. See the [installation instructions](https://nexte.st/docs/installation/pre-built-binaries/). ```shell - cargo check --locked --all-targets --all + cargo nextest run --all --all-features ``` -Note: CI runs these checks across multiple feature combinations (`bashisms`, `sqlite`, `external_printer`, etc.), so you may want to test with the features relevant to your changes using the `--features` flag.