|
1 | 1 | fail_fast: true
|
2 | 2 | repos:
|
3 |
| -- repo: local |
4 |
| - hooks: |
5 |
| - - id: ruff_format |
6 |
| - name: Python format check |
7 |
| - entry: poetry run ruff format --check --diff |
8 |
| - language: system |
9 |
| - types: [file, python] |
10 |
| - stages: [pre-commit] |
11 |
| - - id: ruff_lint |
12 |
| - name: Python lint check |
13 |
| - entry: poetry run ruff check |
14 |
| - language: system |
15 |
| - types: [file, python] |
16 |
| - stages: [pre-commit] |
17 |
| - - id: pyright |
18 |
| - name: Python type check |
19 |
| - entry: poetry run pyright |
20 |
| - language: system |
21 |
| - types: [file, python] |
22 |
| - stages: [pre-commit] |
23 |
| - - id: check-yaml |
24 |
| - name: YAML check |
25 |
| - entry: poetry run check-yaml |
26 |
| - language: python |
27 |
| - types: [yaml] |
28 |
| - stages: [pre-commit] |
29 |
| - - id: check-toml |
30 |
| - name: TOML check |
31 |
| - entry: poetry run check-toml |
32 |
| - language: python |
33 |
| - types: [toml] |
34 |
| - stages: [pre-commit] |
35 |
| - - id: check-json |
36 |
| - name: JSON check |
37 |
| - entry: poetry run check-json |
38 |
| - language: python |
39 |
| - types: [json] |
40 |
| - stages: [pre-commit] |
41 |
| - - id: commitizen |
42 |
| - name: Commit style check |
43 |
| - stages: [commit-msg] |
44 |
| - entry: cz check --commit-msg-file .git/COMMIT_EDITMSG |
45 |
| - pass_filenames: false |
46 |
| - language: system |
| 3 | + - repo: local |
| 4 | + hooks: |
| 5 | + - id: ruff-format |
| 6 | + name: Python format |
| 7 | + description: Run Python code formatting with ruff |
| 8 | + entry: poetry run ruff format |
| 9 | + language: system |
| 10 | + types: [file, python] |
| 11 | + stages: [pre-commit] |
| 12 | + |
| 13 | + - id: ruff-lint |
| 14 | + name: Python lint check |
| 15 | + description: Run Python code linting with ruff |
| 16 | + entry: poetry run ruff check --fix |
| 17 | + language: system |
| 18 | + types: [file, python] |
| 19 | + stages: [pre-commit] |
| 20 | + |
| 21 | + - id: pyright |
| 22 | + name: Python type check |
| 23 | + description: Run Python code type checking with pyright |
| 24 | + entry: poetry run pyright |
| 25 | + language: system |
| 26 | + types: [file, python] |
| 27 | + stages: [pre-commit] |
| 28 | + |
| 29 | + - id: check-yaml |
| 30 | + name: YAML check |
| 31 | + description: Validate all changed YAML files |
| 32 | + entry: poetry run check-yaml |
| 33 | + language: python |
| 34 | + types: [yaml] |
| 35 | + stages: [pre-commit] |
| 36 | + |
| 37 | + - id: check-toml |
| 38 | + name: TOML check |
| 39 | + description: Validate all changed TOML files |
| 40 | + entry: poetry run check-toml |
| 41 | + language: python |
| 42 | + types: [toml] |
| 43 | + stages: [pre-commit] |
| 44 | + |
| 45 | + - id: check-json |
| 46 | + name: JSON check |
| 47 | + description: Validate all changed JSON files |
| 48 | + entry: poetry run check-json |
| 49 | + language: python |
| 50 | + types: [json] |
| 51 | + stages: [pre-commit] |
| 52 | + |
| 53 | + - id: commitizen |
| 54 | + name: Commit style check |
| 55 | + description: Run commitizen to validate commit message |
| 56 | + stages: [commit-msg] |
| 57 | + entry: cz check --commit-msg-file .git/COMMIT_EDITMSG |
| 58 | + pass_filenames: false |
| 59 | + language: system |
| 60 | + |
| 61 | + - id: poetry-check |
| 62 | + name: Poetry configuration check |
| 63 | + description: Run poetry check to validate config |
| 64 | + entry: poetry check |
| 65 | + language: python |
| 66 | + pass_filenames: false |
| 67 | + files: ^(.*/)?(poetry\.lock|pyproject\.toml)$ |
| 68 | + |
| 69 | + - id: poetry-lock |
| 70 | + name: Poetry lock update |
| 71 | + description: Run poetry lock to update lock file |
| 72 | + entry: poetry lock |
| 73 | + language: python |
| 74 | + pass_filenames: false |
| 75 | + files: ^(.*/)?(poetry\.lock|pyproject\.toml)$ |
| 76 | + |
| 77 | + - id: poetry-install |
| 78 | + name: poetry-install |
| 79 | + description: Run poetry install to install dependencies from the lock file |
| 80 | + entry: poetry install |
| 81 | + language: python |
| 82 | + pass_filenames: false |
| 83 | + stages: [post-checkout, post-merge] |
| 84 | + always_run: true |
0 commit comments