-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
72 lines (65 loc) · 1.82 KB
/
.pre-commit-config.yaml
File metadata and controls
72 lines (65 loc) · 1.82 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
64
65
66
67
68
69
70
71
72
# Pre-commit hooks configuration
# See https://pre-commit.com for more information
# To install: pre-commit install
# To run manually: pre-commit run --all-files
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
# Run the formatter
- id: ruff-format
name: ruff format (staged files only)
files: \.(py)$
exclude: |
(?x)^(
runs/|
\.venv/|
\.pytest_cache/|
__pycache__/|
tasks/.*/workspace/
)
# Run the linter
- id: ruff
name: ruff check (staged files only)
args: [--fix, --exit-non-zero-on-fix]
files: \.(py)$
exclude: |
(?x)^(
runs/|
\.venv/|
\.pytest_cache/|
__pycache__/|
tasks/.*/workspace/
)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
name: trim trailing whitespace
- id: end-of-file-fixer
name: ensure files end with newline
- id: check-yaml
name: check yaml syntax
- id: check-toml
name: check toml syntax
- id: check-json
name: check json syntax
exclude: |
(?x)^(
\.vscode/
)
- id: check-merge-conflict
name: check for merge conflicts
- id: check-case-conflict
name: check for case conflicts
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks
name: detect secrets (gitleaks)
# CI is the source of truth - these hooks are optional for developer convenience
# but should match the CI checks
default_language_version:
python: python3
# Don't fail on first error, run all hooks
fail_fast: false