Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
- Snapshot-first test workflow (insta):
- Unit/bin tests with review UI: `mise run test-unit -- <filter>` or `mise run test-all-unit`.
- Integration tests with review UI: `mise run test-integration <test> [filter]` or `mise run test-all-integration`.
- Snapshots live under `crates/prek/src/snapshots/` and are used heavily by tests in `crates/prek/tests/`.
- DO NOT run `cargo test -p prek` while testing, they are slow. Use `cargo test -p prek --lib <unit-test> -- --exact` (or `cargo test -p prek --bin prek <unit-test> -- --exact`) for unit tests and `cargo test -p prek --test <test> -- <filter>` for integration tests.
- Use `cargo insta review --accept` to accept snapshot changes after running tests locally.

## Project-specific conventions

Expand All @@ -36,12 +37,10 @@

- Integration tests use `TestContext` helpers in `crates/prek/tests/common/mod.rs` and snapshot macros like `cmd_snapshot!`.
- Tests often normalize paths with regex filters; prefer using `context.filters()` for stable snapshots.
- DO NOT run whole-workspace tests in CI; they are slow. Use `cargo test -p prek --lib <unit-test> -- --exact` (or `cargo test -p prek --bin prek <unit-test> -- --exact`) for unit tests and `cargo test -p prek --test <test> -- <filter>` for integration tests.
- Use `cargo insta review --accept` to accept snapshot changes after running tests locally.

## Docs + generated artifacts

- Docs are built with MkDocs (see `mkdocs.yml`); run locally via `mise run build-docs`.
- Docs are built with Zensical (see `mkdocs.yml`); run locally via `mise run build-docs`.
- CLI reference + JSON schema are generated via `mise run generate` (see tasks in `mise.toml`).

## When changing behavior
Expand Down