Skip to content

Commit 3da0af9

Browse files
committed
docs(ai): add hint to follow RUSTFLAGS suggestions from failing tests
https://claude.ai/code/session_01KKiNFj2QH1VCLR2AHyEvN4
1 parent a9f22a1 commit 3da0af9

5 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
1515
- Custom errors: `#[derive(Debug, Display, Error)]`
1616
- Minimize `unwrap()` in non-test code — use proper error handling
1717
- Install toolchain before running tests: `rustup toolchain install "$(< rust-toolchain)" && rustup component add --toolchain "$(< rust-toolchain)" rustfmt clippy`
18-
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes
18+
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes. If a test fails with a hint about `RUSTFLAGS` and `--cfg`, follow the hint (e.g. `RUSTFLAGS='--cfg pdu_test_skip_fs_errors'` when running as root) and rerun.
1919
- **ALWAYS run the full test suite** (`FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh`) before committing, regardless of how trivial the change seems — this includes documentation-only changes, comment edits, config changes, and refactors. The test suite checks formatting, linting, building, tests, and docs across multiple feature combinations; any type of change can break any of these checks.

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
1515
- Custom errors: `#[derive(Debug, Display, Error)]`
1616
- Minimize `unwrap()` in non-test code — use proper error handling
1717
- Install toolchain before running tests: `rustup toolchain install "$(< rust-toolchain)" && rustup component add --toolchain "$(< rust-toolchain)" rustfmt clippy`
18-
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes
18+
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes. If a test fails with a hint about `RUSTFLAGS` and `--cfg`, follow the hint (e.g. `RUSTFLAGS='--cfg pdu_test_skip_fs_errors'` when running as root) and rerun.
1919
- **ALWAYS run the full test suite** (`FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh`) before committing, regardless of how trivial the change seems — this includes documentation-only changes, comment edits, config changes, and refactors. The test suite checks formatting, linting, building, tests, and docs across multiple feature combinations; any type of change can break any of these checks.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
1515
- Custom errors: `#[derive(Debug, Display, Error)]`
1616
- Minimize `unwrap()` in non-test code — use proper error handling
1717
- Install toolchain before running tests: `rustup toolchain install "$(< rust-toolchain)" && rustup component add --toolchain "$(< rust-toolchain)" rustfmt clippy`
18-
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes
18+
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes. If a test fails with a hint about `RUSTFLAGS` and `--cfg`, follow the hint (e.g. `RUSTFLAGS='--cfg pdu_test_skip_fs_errors'` when running as root) and rerun.
1919
- **ALWAYS run the full test suite** (`FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh`) before committing, regardless of how trivial the change seems — this includes documentation-only changes, comment edits, config changes, and refactors. The test suite checks formatting, linting, building, tests, and docs across multiple feature combinations; any type of change can break any of these checks.
2020
- `gh` (GitHub CLI) is not installed — do not attempt to use it

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,8 @@ The CI script `test.sh` runs all of these across 5 feature combinations. You can
343343
FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh
344344
```
345345

346-
**Important:** Always run the full test suite before committing, even for seemingly trivial changes such as documentation edits, comment changes, or config updates. Any change can break formatting, linting, building, tests, or doc generation across the different feature combinations.
346+
> [!IMPORTANT]
347+
> Always run the full test suite before committing, even for seemingly trivial changes such as documentation edits, comment changes, or config updates. Any change can break formatting, linting, building, tests, or doc generation across the different feature combinations.
348+
349+
> [!NOTE]
350+
> Some tests may fail with a hint about `RUSTFLAGS` and `--cfg` flags (e.g. `RUSTFLAGS='--cfg pdu_test_skip_fs_errors'` when running as root). Follow the hint and rerun.

template/ai-instructions/shared.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ Read and follow the CONTRIBUTING.md file in this repository for all code style c
1515
- Custom errors: `#[derive(Debug, Display, Error)]`
1616
- Minimize `unwrap()` in non-test code — use proper error handling
1717
- Install toolchain before running tests: `rustup toolchain install "$(< rust-toolchain)" && rustup component add --toolchain "$(< rust-toolchain)" rustfmt clippy`
18-
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes
18+
- Run `FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh` to validate changes. If a test fails with a hint about `RUSTFLAGS` and `--cfg`, follow the hint (e.g. `RUSTFLAGS='--cfg pdu_test_skip_fs_errors'` when running as root) and rerun.
1919
- **ALWAYS run the full test suite** (`FMT=true LINT=true BUILD=true TEST=true DOC=true ./test.sh`) before committing, regardless of how trivial the change seems — this includes documentation-only changes, comment edits, config changes, and refactors. The test suite checks formatting, linting, building, tests, and docs across multiple feature combinations; any type of change can break any of these checks.

0 commit comments

Comments
 (0)