-
Notifications
You must be signed in to change notification settings - Fork 0
/
.lefthook.yaml
28 lines (28 loc) · 915 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
---
skip_output:
- meta # Skips lefthook version printing
- empty_summary # Skips summary heading when there are no steps to run
- execution # Skips printing any execution logs (but prints if the execution failed)
- execution_out # Skips printing execution output (but still prints failed commands output)
- skips # Skips "skip" printing (i.e. no files matched)
pre-commit:
parallel: true
commands:
actionlint:
tags: lint
glob: ".github/workflows/*.yml"
run: actionlint {staged_files}
golangci:
tags: lint
glob: "*.go"
run: golangci-lint run ./...
prettier:
tags: style
glob: "*.{md,yaml,yml}"
stage_fixed: true
run: prettier --write {staged_files}
yamllint:
tags: lint
glob: "*.{yaml,yml}"
run: |
yamllint -d "{extends: default, rules: {line-length: {max: 120}, comments: disable}}" {staged_files}