-
Notifications
You must be signed in to change notification settings - Fork 0
/
lefthook.yaml
41 lines (37 loc) · 1015 Bytes
/
lefthook.yaml
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
# EXAMPLE USAGE:
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md
#
# pre-commit:
# commands:
# rubocop:
# tags: backend style
# glob: "*.rb"
# exclude: "application.rb|routes.rb"
# run: bundle exec rubocop --force-exclusion {all_files}
# scripts:
# "hello.sh":
# runner: bash
pre-commit:
parallel: true
commands:
censor-sensitives:
run: "! rg -. -f .sensitives.txt -- {staged_files}"
skip: [merge, rebase, delete]
no-local:
run: "! rg -. $HOME -- {staged_files}"
skip: [merge, rebase]
no-conflicts:
run: "conflicts {staged_files}"
compile-zsh:
glob: "zsh/**/*.sh"
run: zsh/compile.zsh {staged_files}
pre-push:
parallel: true
commands:
censor-sensitives:
run: "! rg -. -f .sensitives.txt -- {push_files}"
censor-logs:
run: "! git log @{push}..HEAD | rg -f .sensitives.txt"
skip: [merge, rebase, delete]