-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
47 lines (42 loc) · 1.22 KB
/
.pre-commit-config.yaml
File metadata and controls
47 lines (42 loc) · 1.22 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
# Pre-commit hooks. Install with: pre-commit install --install-hooks
# CI re-runs the same checks on every PR.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
args: ["--maxkb=500"]
- id: detect-private-key
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
exclude: \.secrets\.baseline$
- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
- id: gitleaks
args: ["--config", ".gitleaks.toml"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: local
hooks:
- id: anthropic-key-regex
name: block Anthropic / OpenAI / GitHub credentials
entry: bash scripts/secret_scan.sh
language: system
pass_filenames: false
stages: [pre-commit]