-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
70 lines (69 loc) · 2.16 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
70 lines (69 loc) · 2.16 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
default_install_hook_types:
- pre-commit
default_stages:
- pre-commit
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
args: ['--maxkb=100']
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
- id: check-symlinks
- id: mixed-line-ending
args: [--fix=lf]
- repo: local
hooks:
- id: uv-lock
name: uv lock
description: Sync uv lock
entry: uv lock --quiet
language: python
pass_filenames: false
- id: ruff-format
name: ruff format
description: Format with ruff
entry: uv run --frozen -q ruff format
language: system
pass_filenames: false
- id: ruff-check
name: ruff
description: Lint with ruff
entry: uv run --frozen -q ruff check --fix --exit-non-zero-on-fix
language: system
pass_filenames: false
- id: mypy-check
name: mypy
description: Check types with mypy
entry: uv run --frozen -q mypy .
language: system
pass_filenames: false
files: \.py$
- id: py-test
name: pytest
description: Run pytest
entry: uv run --frozen -q pytest --ff --exitfirst
language: system
pass_filenames: false
- id: shellcheck
name: shellcheck
language: system
entry: bash -c 'git ls-files "*.sh" "*.bash" | xargs -r shellcheck -S warning'
pass_filenames: false
always_run: true
- id: uncrustify
name: uncrustify
language: system
entry: sh -c 'uncrustify -c uncrustify.cfg --no-backup $(git ls-files "*.c" "*.h") && git diff --exit-code'
pass_filenames: false
always_run: true
- id: meson
name: build and test with meson
language: system
entry: sh -c 'meson setup builddir --reconfigure -Dtests=true && meson compile -C builddir && meson test -C builddir'
pass_filenames: false
always_run: true