Skip to content

Commit 8b8d147

Browse files
committed
Use prek in docuemntation
1 parent 2c68057 commit 8b8d147

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

.devcontainer/post-create.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ rustup component add clippy rustfmt
55
cargo install cargo-insta
66
cargo fetch
77

8-
pip install maturin pre-commit
8+
pip install maturin prek

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ repos:
119119
- id: actionlint
120120
stages:
121121
# This hook is disabled by default, since it's quite slow.
122-
# To run all hooks *including* this hook, use `uvx pre-commit run -a --hook-stage=manual`.
123-
# To run *just* this hook, use `uvx pre-commit run -a actionlint --hook-stage=manual`.
122+
# To run all hooks *including* this hook, use `uvx prek run -a --hook-stage=manual`.
123+
# To run *just* this hook, use `uvx prek run -a actionlint --hook-stage=manual`.
124124
- manual
125125
args:
126126
- "-ignore=SC2129" # ignorable stylistic lint from shellcheck

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ When working on ty, PR titles should start with `[ty]` and be tagged with the `t
6565
- All changes must be tested. If you're not testing your changes, you're not done.
6666
- Get your tests to pass. If you didn't run the tests, your code does not work.
6767
- Follow existing code style. Check neighboring files for patterns.
68-
- Always run `uvx pre-commit run -a` at the end of a task.
68+
- Always run `uvx prek run -a` at the end of a task.
6969
- Avoid writing significant amounts of new code. This is often a sign that we're missing an existing method or mechanism that could help solve the problem. Look for existing utilities first.
7070
- Avoid falling back to patterns that require `panic!`, `unreachable!`, or `.unwrap()`. Instead, try to encode those constraints in the type system.
7171
- Prefer let chains (`if let` combined with `&&`) over nested `if let` statements to reduce indentation and improve readability.

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ You can optionally install pre-commit hooks to automatically run the validation
5757
when making a commit:
5858

5959
```shell
60-
uv tool install pre-commit
61-
pre-commit install
60+
uv tool install prek
61+
prek install
6262
```
6363

6464
We recommend [nextest](https://nexte.st/) to run Ruff's test suite (via `cargo nextest run`),
@@ -85,7 +85,7 @@ and that it passes both the lint and test validation checks:
8585
```shell
8686
cargo clippy --workspace --all-targets --all-features -- -D warnings # Rust linting
8787
RUFF_UPDATE_SCHEMA=1 cargo test # Rust testing and updating ruff.schema.json
88-
uvx pre-commit run --all-files --show-diff-on-failure # Rust and Python formatting, Markdown and Python linting, etc.
88+
uvx prek run -a # Rust and Python formatting, Markdown and Python linting, etc.
8989
```
9090

9191
These checks will run on GitHub Actions when you open your pull request, but running them locally

crates/ty/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ You can optionally install pre-commit hooks to automatically run the validation
3838
when making a commit:
3939

4040
```shell
41-
uv tool install pre-commit
42-
pre-commit install
41+
uv tool install prek
42+
prek install
4343
```
4444

4545
We recommend [nextest](https://nexte.st/) to run ty's test suite (via `cargo nextest run`),
@@ -66,7 +66,7 @@ and that it passes both the lint and test validation checks:
6666
```shell
6767
cargo clippy --workspace --all-targets --all-features -- -D warnings # Rust linting
6868
cargo test # Rust testing
69-
uvx pre-commit run --all-files --show-diff-on-failure # Rust and Python formatting, Markdown and Python linting, etc.
69+
uvx prek run -a # Rust and Python formatting, Markdown and Python linting, etc.
7070
```
7171

7272
These checks will run on GitHub Actions when you open your pull request, but running them locally

0 commit comments

Comments
 (0)