refactor(skills): consolidate Rust Bazel rules

This commit is contained in:
2026-09-17 08:59:42 -04:00
parent 02496a688e
commit c34b93446f
2 changed files with 23 additions and 13 deletions

View File

@@ -1,5 +1,28 @@
# Bazel rules
## Keep Rust tests in separate files
### Rule
Put Rust tests in separate `*_test.rs` files.
Do not add inline `#[cfg(test)]` modules.
### Rationale
Separate test files keep production modules focused and match the repository's Bazel test layout.
## Declare Rust tests in Bazel
### Rule
Declare Rust test files in the nearest Bazel `BUILD` file with `rust_test`.
Do not add `[[test]]` entries to `Cargo.toml` unless the operator explicitly requests Cargo test declarations.
### Rationale
Bazel is the source of truth for Rust test targets in this repository.
Keeping test declarations in Bazel avoids duplicate test target lists.
## Use one source input style per `rust_test`
### Rule

View File

@@ -1,13 +0,0 @@
# Test rules
## Keep Rust tests in separate files
### Rule
Put Rust tests in separate `*_test.rs` files.
Do not add inline `#[cfg(test)]` modules.
Declare each test file in the nearest Bazel `BUILD` file with a `rust_test` target.
### Rationale
Separate test files keep production modules focused and match the repository's Bazel test layout.