fe5f085299
## Summary Noticed that running `cargo dev generate-all` on `main` produced changes and saw that that the command is not run on the CI nor as a pre-commit hook. Not sure if having the command running as a pre-commit hook is something we want, so I can remove it if you prefer. I find that nice to have as it's probably easy to forget to run it, especially for new contributors (and it will only run if there are changes in `uv_cli` or `uv_settings` crates). ## Test Plan - Added `cargo dev generate-all --mode check` on the CI, which produced [this failing job](https://github.com/astral-sh/uv/actions/runs/10648055597/job/29516699393) - Ran `cargo dev generate-all` locally and committed the changes, which produced [this succeeding job](https://github.com/astral-sh/uv/actions/runs/10648076910/job/29516744942)
50 lines
1.0 KiB
YAML
50 lines
1.0 KiB
YAML
fail_fast: true
|
|
|
|
exclude: |
|
|
(?x)^(
|
|
.*/(snapshots)/.*|
|
|
)$
|
|
|
|
repos:
|
|
- repo: https://github.com/abravalheri/validate-pyproject
|
|
rev: v0.19
|
|
hooks:
|
|
- id: validate-pyproject
|
|
|
|
- repo: https://github.com/crate-ci/typos
|
|
rev: v1.24.1
|
|
hooks:
|
|
- id: typos
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: cargo-fmt
|
|
name: cargo fmt
|
|
entry: cargo fmt --
|
|
language: system
|
|
types: [rust]
|
|
pass_filenames: false # This makes it a lot faster
|
|
|
|
- repo: local
|
|
hooks:
|
|
- id: cargo-dev-generate-all
|
|
name: cargo dev generate-all
|
|
entry: cargo dev generate-all
|
|
language: system
|
|
types: [rust]
|
|
pass_filenames: false
|
|
files: ^crates/(uv-cli|uv-settings)/
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
rev: v3.1.0
|
|
hooks:
|
|
- id: prettier
|
|
types_or: [yaml, json5]
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.6.2
|
|
hooks:
|
|
- id: ruff-format
|
|
- id: ruff
|
|
args: [--fix, --exit-non-zero-on-fix]
|