-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlefthook.yml
92 lines (91 loc) · 4.8 KB
/
lefthook.yml
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
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
pre-commit:
# parallel: true
piped: true
commands:
00_eclint:
run: eclint check */**/*
01_prepare:
run: if [ -d .lefthook ]; then rm -r .lefthook; fi; mkdir .lefthook
02_oj-resolve:
run: competitive-verifier oj-resolve > .lefthook/oj-resolve.json
03_verify:
run: LEFTHOOK_QUIET=meta,success lefthook run parallel_verify
04_check:
run: competitive-verifier check .lefthook/verify_00.json .lefthook/verify_01.json .lefthook/verify_02.json .lefthook/verify_03.json .lefthook/verify_04.json .lefthook/verify_05.json .lefthook/verify_06.json .lefthook/verify_07.json .lefthook/verify_08.json .lefthook/verify_09.json .lefthook/verify_10.json .lefthook/verify_11.json .lefthook/verify_12.json .lefthook/verify_13.json .lefthook/verify_14.json .lefthook/verify_15.json .lefthook/verify_16.json .lefthook/verify_17.json .lefthook/verify_18.json .lefthook/verify_19.json
05_clean:
run: rm -r .lefthook
parallel_verify:
parallel: true
commands:
00_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 0 --output .lefthook/verify_00.json
01_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 1 --output .lefthook/verify_01.json
02_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 2 --output .lefthook/verify_02.json
03_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 3 --output .lefthook/verify_03.json
04_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 4 --output .lefthook/verify_04.json
05_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 5 --output .lefthook/verify_05.json
06_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 6 --output .lefthook/verify_06.json
07_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 7 --output .lefthook/verify_07.json
08_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 8 --output .lefthook/verify_08.json
09_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 9 --output .lefthook/verify_09.json
10_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 10 --output .lefthook/verify_10.json
11_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 11 --output .lefthook/verify_11.json
12_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 12 --output .lefthook/verify_12.json
13_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 13 --output .lefthook/verify_13.json
14_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 14 --output .lefthook/verify_14.json
15_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 15 --output .lefthook/verify_15.json
16_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 16 --output .lefthook/verify_16.json
17_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 17 --output .lefthook/verify_17.json
18_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 18 --output .lefthook/verify_18.json
19_verify:
run: competitive-verifier verify --verify-json .lefthook/oj-resolve.json --split 20 --split-index 19 --output .lefthook/verify_19.json
# eslint:
# glob: "*.{js,ts,jsx,tsx}"
# run: yarn eslint {staged_files}
# rubocop:
# tags: backend style
# glob: "*.rb"
# exclude: "application.rb|routes.rb"
# run: bundle exec rubocop --force-exclusion {all_files}
# govet:
# tags: backend style
# files: git ls-files -m
# glob: "*.go"
# run: go vet {files}
# scripts:
# "hello.js":
# runner: node
# "any.go":
# runner: go run