-
Notifications
You must be signed in to change notification settings - Fork 191
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
58 lines (55 loc) · 1.62 KB
/
.pre-commit-config.yaml
File metadata and controls
58 lines (55 loc) · 1.62 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
repos:
- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
language_version: python3.11
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-json
- id: check-yaml
args: [--multi]
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
- repo: https://github.com/gklein/check_signoff
rev: v1.0.5
hooks:
- id: check-signoff
language_version: python3.11
- repo: local
hooks:
- id: validate-retry-usage
name: Validate Retry Usage
entry: python scripts/python/checks/validate_retry_usage.py
language: system
types: [python]
files: \.py$
- repo: https://github.com/ibm/detect-secrets
rev: 0.13.1+ibm.64.dss
hooks:
- id: detect-secrets
args: [--baseline, .secrets.baseline, --use-all-plugins, --fail-on-unaudited]
# Local wrapper to strip "generated_at" after detect-secrets runs
- repo: local
hooks:
- id: strip-generated-at
name: Strip generated_at from detect-secrets baseline
entry: >
bash -c '
if [ -f .secrets.baseline ]; then
if command -v jq >/dev/null 2>&1; then
tmp=$(mktemp)
jq "del(.generated_at)" .secrets.baseline > "$tmp" && mv "$tmp" .secrets.baseline
else
echo "jq not found: skipping generated_at cleanup" >&2
fi
fi
'
language: system
pass_filenames: false