-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
84 lines (75 loc) · 2.39 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
84 lines (75 loc) · 2.39 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
73
74
75
76
77
78
79
80
81
82
83
84
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0 # Latest stable version
hooks:
- id: check-merge-conflict
args: ['--assume-in-merge']
- id: trailing-whitespace
exclude: '\.py$' # Exclude Python files as Ruff already handles them
- id: check-added-large-files
args: ['--maxkb=1000']
- id: end-of-file-fixer
exclude: '^(.*\.svg)$'
- id: no-commit-to-branch
- id: check-yaml
args: ["--unsafe"]
- id: detect-private-key
- id: mixed-line-ending
args: [--fix=lf] # Forces to replace line ending by LF (line feed)
- id: check-executables-have-shebangs
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.4
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/rhysd/actionlint
rev: v1.7.11
hooks:
- id: actionlint
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck
- repo: local
hooks:
- id: gen-config
name: Generate config.yaml
entry: uv run build/gen_config.py
language: system
pass_filenames: false
require_serial: true
always_run: true
- id: gen-containerfile
name: Generate Containerfile
entry: uv run build/gen_containerfile.py
language: system
pass_filenames: false
require_serial: true
always_run: true
- id: verify-secrets
name: Verify _FILE secret sync
entry: uv run build/verify_secrets.py
language: system
pass_filenames: false
require_serial: true
always_run: true
- id: doc-gen
name: Distribution Documentation
entry: uv run build/gen_distro_docs.py
language: system
pass_filenames: false
require_serial: true
files: ^(build/(build\.yaml|build\.env)|distribution/config\.yaml)$
- id: check-secret-scrub
name: CI log-scrub list matches smoke.sh secrets
entry: ./tests/check_secret_scrub_list.sh
language: script
pass_filenames: false
files: ^(tests/smoke\.sh|\.github/workflows/redhat-distro-container\.yml)$