forked from opendatahub-io/ogx-distribution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
66 lines (60 loc) · 1.8 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
66 lines (60 loc) · 1.8 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
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: pkg-gen
name: Distribution Build
entry: ./build/build.py
language: python
pass_filenames: false
require_serial: true
always_run: true
additional_dependencies:
- uv>=0.9.0
- ruamel.yaml>=0.18.0
- id: doc-gen
name: Distribution Documentation
entry: ./build/gen_distro_docs.py
language: python
pass_filenames: false
require_serial: true
files: ^(build/(build\.yaml|build\.env)|distribution/config\.yaml)$
additional_dependencies:
- pyyaml==6.0.2