|
| 1 | +# Repository Guidelines |
| 2 | + |
| 3 | +## Project Structure & Modules |
| 4 | +- Rust workspace (`Cargo.toml`) with crates: `etl/` (core), `etl-api/` (HTTP API), `etl-postgres/`, `etl-destinations/`, `etl-replicator/`, `etl-config/`, `etl-telemetry/`, `etl-examples/`, `etl-benchmarks/`. |
| 5 | +- Docs in `docs/`; ops tooling in `scripts/` (Docker Compose, DB init, migrations). |
| 6 | +- Tests live per crate (`src` unit tests, `tests` integration); benches in `etl-benchmarks/benches/`. |
| 7 | + |
| 8 | +## Build and Test |
| 9 | +- Build: `cargo build --workspace --all-targets --all-features`. |
| 10 | +- Lint/format: `cargo fmt`; `cargo clippy --all-targets --all-features -- -D warnings`. |
| 11 | + |
| 12 | +## Coding Style & Naming |
| 13 | +- Rust 2024 edition; keep formatter clean and warnings denied. |
| 14 | +- Naming: crates `kebab-case`; files/modules `snake_case`; types/traits `CamelCase`; fns/vars `snake_case`. |
| 15 | + |
| 16 | +## Rust Docs Style |
| 17 | +- Document all items, public and private, using stdlib tone and precision. |
| 18 | +- Only use a "# Panics" section when a function can panic. |
| 19 | +- Link types and methods as [`Type`], [`Type::method`]. |
| 20 | +- Keep wording concise, correct, and punctuated; reword for clarity while preserving intent. |
| 21 | +- No code examples; include private helpers for maintainers; apply to modules, types, traits, impls, and functions. |
| 22 | + |
| 23 | +## Rust Tests Execution |
| 24 | +- If output shows "0 passed; 0 failed; 0 ignored; n filtered out", tests did not run; treat as failure. |
| 25 | +- Common fixes: add features (`cargo test --all-features` or `--features <flag>`), pick the right target (`--lib`, `--bins`, `--tests`), verify integration vs unit layout, remove name filters, or run for the workspace (`cargo test --workspace`) or a specific crate. |
| 26 | +- Always verify actual execution: passed count > 0, test names appear, and counts match expectations. |
| 27 | +- Quick diagnostic: list available tests with `cargo test -- --list` before running. |
0 commit comments