-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
79 lines (72 loc) · 3.38 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
79 lines (72 loc) · 3.38 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
default_install_hook_types:
- pre-commit
- commit-msg
- pre-push
default_stages:
- pre-commit
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
exclude: ^(audio/reference-di/|docs/assets/matchmatch-logo\.png$)
- repo: local
hooks:
- id: conventional-commit
name: Conventional commit message
entry: python scripts/check_commit_msg.py
language: python
stages:
- commit-msg
- id: ruff-lint
name: Ruff lint
entry: >-
bash -c 'export UV_PROJECT_ENVIRONMENT="${XDG_DATA_HOME:-$HOME/.local/share}/matchpatch/.venv-wsl";
python3 scripts/run_hook_with_hint.py
--hint "UV_PROJECT_ENVIRONMENT=\"\${XDG_DATA_HOME:-\$HOME/.local/share}/matchpatch/.venv-wsl\" uv run --frozen --no-default-groups --group wsl ruff check --fix ."
-- uv run --frozen --no-default-groups --group wsl ruff check .'
language: system
pass_filenames: false
- id: ruff-format
name: Ruff format check
entry: >-
bash -c 'export UV_PROJECT_ENVIRONMENT="${XDG_DATA_HOME:-$HOME/.local/share}/matchpatch/.venv-wsl";
python3 scripts/run_hook_with_hint.py
--hint "UV_PROJECT_ENVIRONMENT=\"\${XDG_DATA_HOME:-\$HOME/.local/share}/matchpatch/.venv-wsl\" uv run --frozen --no-default-groups --group wsl ruff format ."
-- uv run --frozen --no-default-groups --group wsl ruff format --check .'
language: system
pass_filenames: false
- id: maintainability
name: Maintainability budgets
entry: >-
bash -c 'export UV_CACHE_DIR=/tmp/matchpatch-uv-cache;
export UV_PROJECT_ENVIRONMENT="${XDG_DATA_HOME:-$HOME/.local/share}/matchpatch/.venv-wsl";
python3 scripts/run_hook_with_hint.py
--hint "UV_CACHE_DIR=/tmp/matchpatch-uv-cache UV_PROJECT_ENVIRONMENT=\"\${XDG_DATA_HOME:-\$HOME/.local/share}/matchpatch/.venv-wsl\" uv run --frozen --no-default-groups --group wsl --extra gui python scripts/check_maintainability.py"
-- uv run --frozen --no-default-groups --group wsl --extra gui python scripts/check_maintainability.py'
language: system
pass_filenames: false
- id: ty
name: ty
entry: >-
bash -c 'export UV_PROJECT_ENVIRONMENT="${XDG_DATA_HOME:-$HOME/.local/share}/matchpatch/.venv-wsl";
python3 scripts/run_hook_with_hint.py
--hint "UV_PROJECT_ENVIRONMENT=\"\${XDG_DATA_HOME:-\$HOME/.local/share}/matchpatch/.venv-wsl\" uv run --frozen --no-default-groups --group wsl ty check"
-- uv run --frozen --no-default-groups --group wsl ty check'
language: system
pass_filenames: false
- id: pytest
name: pytest
entry: >-
bash -c 'export UV_PROJECT_ENVIRONMENT="${XDG_DATA_HOME:-$HOME/.local/share}/matchpatch/.venv-wsl";
python3 scripts/run_hook_with_hint.py
--hint "UV_PROJECT_ENVIRONMENT=\"\${XDG_DATA_HOME:-\$HOME/.local/share}/matchpatch/.venv-wsl\" uv run --frozen --no-default-groups --group wsl pytest --no-cov"
-- uv run --frozen --no-default-groups --group wsl pytest --no-cov'
language: system
pass_filenames: false
stages:
- pre-push