-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathlefthook.yml
More file actions
51 lines (42 loc) · 1.21 KB
/
lefthook.yml
File metadata and controls
51 lines (42 loc) · 1.21 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
# Lefthook configuration for versatiles-rs
# Optional but recommended for contributors
#
# Installation:
# macOS: brew install lefthook
# Linux: See https://github.com/evilmartians/lefthook
# Windows: scoop install lefthook
#
# Setup: lefthook install
pre-commit:
parallel: true
commands:
# Rust formatting check (fast)
rust-fmt:
glob: '*.rs'
run: cargo fmt -- --check
stage_fixed: true
# Node.js formatting check (fast)
node-format:
glob: 'versatiles_node/**/*.{ts,js,json,md}'
run: cd versatiles_node && npm run format:check
stage_fixed: true
# TypeScript type check (medium speed)
node-typecheck:
glob: 'versatiles_node/src/**/*.ts'
run: cd versatiles_node && npm run typecheck
# ESLint (fast)
node-lint:
glob: 'versatiles_node/src/**/*.ts'
run: cd versatiles_node && npm run lint
pre-push:
parallel: false
commands:
# Full Node.js checks before push
node-check:
run: cd versatiles_node && npm run check
# Full Rust checks before push
rust-check:
run: cargo clippy --workspace --all-targets -- -D warnings
# All tests before push
test:
run: cargo test --workspace --all-targets