-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
83 lines (83 loc) · 2.69 KB
/
.pre-commit-config.yaml
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
repos:
- repo: local
hooks:
- id: ruff-lint
name: ruff-lint
entry: ruff check
args:
[
--force-exclude,
--config,
pyproject.toml,
--fix,
--show-fixes,
--exit-non-zero-on-fix,
]
language: system
types_or: [python]
require_serial: true # run once for all files
- id: ruff-format
name: ruff-format
entry: ruff format
args: [--force-exclude, --config, pyproject.toml]
language: system
types_or: [python]
require_serial: true # run once for all files
- id: pyright
name: pyright
entry: pyright
language: system
types: [python]
require_serial: true # run once for all files
- id: gen-schema
name: gen-schema
entry: python hooks/gen_schema.py
language: system
types: [python]
require_serial: true
pass_filenames: false
exclude: ^tests/.*snapshots/
- id: gen-docs-cli
name: gen-docs-cli
entry: python hooks/gen_docs/gen_docs_cli_usage.py
language: system
types: [python]
require_serial: true
exclude: ^tests/.*snapshots/
pass_filenames: false
- id: gen-docs-env-vars
name: gen-docs-env-vars
entry: python hooks/gen_docs/gen_docs_env_vars.py
language: system
types: [python]
require_serial: true
exclude: ^tests/.*snapshots/
pass_filenames: false
- id: gen-docs-components
name: gen-docs-components
entry: python hooks/gen_docs/gen_docs_components.py
language: system
# .gitignore -- indicates whether the script is ran with `--all-files`
# hooks/gen_docs.py -- hook's behavior is possibly changed
# kpops/cli/main.py -- typer-cli has to generate the CLI Usage reference
# docs/.../.yaml -- examples changed or dependencies edited
# kpops/components/... -- KPOps components possibly changed
files: >
(?x)^(
.gitignore
| hooks/gen_docs\.py
| docs/docs/resources/pipeline-defaults/headers/.*\.yaml
| docs/docs/resources/pipeline-components/headers/.*\.yaml
| docs/docs/resources/pipeline-components/sections/.*\.yaml
| docs/docs/resources/pipeline-components/dependencies/.*\.yaml
| kpops/cli/main\.py
| kpops/components/.*\.py
)$
require_serial: true
- id: dprint
name: dprint
entry: dprint fmt
language: system
types: [markdown]
require_serial: true
pass_filenames: false