-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
63 lines (58 loc) · 2.08 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
63 lines (58 loc) · 2.08 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Pre-commit hooks configuration
# See https://pre-commit.com for more information
#
# Install with: uv run pre-commit install --install-hooks
# Run manually: uv run pre-commit run --all-files
repos:
# Ruff — Python linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: ruff
name: ruff check
args: [--fix]
types_or: [python, pyi]
- id: ruff-format
name: ruff format
types_or: [python, pyi]
# Standard pre-commit hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=2000']
exclude: '^(uv\.lock|benchmarks/appworld/appworld/|vendor/|milvus_policies\.db|.*\.parquet)'
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
exclude: '^(uv\.lock|benchmarks/appworld/appworld/|vendor/)'
- id: trailing-whitespace
exclude: '^(uv\.lock|benchmarks/appworld/appworld/|vendor/)'
# Conventional commit messages
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.3.0
hooks:
- id: conventional-pre-commit
name: conventional commits
stages: [commit-msg]
args: []
# Detect secrets — prevent committing credentials
- repo: https://github.com/ibm/detect-secrets
rev: 0.13.1+ibm.64.dss
hooks:
- id: detect-secrets
name: detect secrets
args: ['--baseline', '.secrets.baseline']
exclude: '(uv\.lock|benchmarks/appworld/appworld/|\.secrets\.baseline|.*\.parquet)'
# Block accidental commits of the local AppWorld editable entries that
# ./setup_appworld.sh injects into pyproject.toml AND uv.lock. Those
# entries point at a path that only exists on machines where
# setup_appworld.sh has run.
- repo: local
hooks:
- id: no-local-appworld
name: no local appworld in pyproject.toml / uv.lock
entry: scripts/check_no_local_appworld.sh
language: script
files: '^(pyproject\.toml|uv\.lock)$'
pass_filenames: false