forked from lance-format/lance
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
30 lines (27 loc) · 1.16 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
30 lines (27 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
- repo: https://github.com/crate-ci/typos
rev: v1.26.0
hooks:
- id: typos
# Catch a Cargo.toml change that wasn't reflected in the matching Cargo.lock.
# Runs fully offline (`--frozen` = `--locked` + `--offline`) and does not compile,
# so it stays fast. Checks all three lockfiles since a workspace dep change can
# touch the excluded python/ and java/ locks too.
- repo: local
hooks:
- id: cargo-lock-sync
name: Cargo.lock in sync with Cargo.toml (offline)
entry: bash -c 'for m in Cargo.toml python/Cargo.toml java/lance-jni/Cargo.toml; do cargo metadata --frozen --format-version 1 --manifest-path "$m" >/dev/null 2>&1 || { echo "Cargo.lock is out of date for $m. Refresh it (e.g. cargo check --manifest-path $m) and commit the updated lockfile."; exit 1; }; done'
language: system
files: '(^|/)Cargo\.(toml|lock)$'
pass_filenames: false