forked from dlc-markets/pythia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlefthook.yml
More file actions
51 lines (46 loc) · 1.29 KB
/
lefthook.yml
File metadata and controls
51 lines (46 loc) · 1.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
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
pre-commit:
parallel: true
jobs:
- name: prepare sqlx for offline mode
group:
piped: true
jobs:
- name: check if sqlx-cli is installed
tags: rust
glob: '*.rs'
run: |
if ! command -v cargo-sqlx &> /dev/null; then
echo "sqlx-cli is not installed. Installing..."
cargo install sqlx-cli --no-default-features --features native-tls,postgres
fi
- name: prepare sqlx
tags: rust
glob: '*.rs'
run: pnpm sqlx-prepare && git add .sqlx/
- name: spelling
run: pnpm cspell --config cspell.json --show-suggestions --show-context --no-progress --no-must-find-files {staged_files}
- name: linting
run: pnpm biome format --fix
- name: cargo-fmt
tags: rust
glob: '*.rs'
run: cargo fmt --all -- --check
stage_fixed: true
- name: cargo-clippy
tags: rust
glob: '*.rs'
run: cargo clippy
post-merge:
commands:
install:
run: pnpm install
post-checkout:
commands:
install:
skip:
- ref: main
run: pnpm install