-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
95 lines (86 loc) · 2.29 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
95 lines (86 loc) · 2.29 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
repos:
# Python - Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
# Python - uv lockfile
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.30
hooks:
- id: uv-lock
files: server/pyproject.toml
args: [--project, server]
# Python - Type checking and tests
- repo: local
hooks:
- id: ty-check
name: ty type check
entry: uv run --directory server ty check
language: system
types: [python]
pass_filenames: false
files: ^server/
- id: pytest
name: pytest
entry: uv run --directory server pytest
language: system
types: [python]
pass_filenames: false
files: ^server/
# TypeScript - Biome and TypeScript
- repo: local
hooks:
- id: biome
name: biome check
entry: pnpm --dir app run lint
language: system
types_or: [ts, tsx, json]
pass_filenames: false
files: ^app/
- id: typescript
name: typescript check
entry: pnpm --dir app run typecheck
language: system
types_or: [ts, tsx]
pass_filenames: false
files: ^app/
# Rust - Clippy and Fmt
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --manifest-path app/src-tauri/Cargo.toml --
language: system
types: [rust]
pass_filenames: false
files: ^app/src-tauri/
- id: cargo-clippy
name: cargo clippy
entry: >-
cargo clippy --all-targets --all-features --locked
--manifest-path app/src-tauri/Cargo.toml -- -D warnings
language: system
types: [rust]
pass_filenames: false
files: ^app/src-tauri/
# Tests
- repo: local
hooks:
- id: vitest
name: vitest
entry: pnpm --dir app test
language: system
types_or: [ts, tsx]
pass_filenames: false
files: ^app/
- id: cargo-test
name: cargo test
entry: cargo test --quiet --locked --manifest-path app/src-tauri/Cargo.toml
language: system
types: [rust]
pass_filenames: false
files: ^app/src-tauri/