-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.yaml
52 lines (52 loc) · 1.93 KB
/
base.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
41
42
43
44
45
46
47
48
49
50
51
52
---
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)
commit-msg:
commands:
commitlint:
# Installing @well-crafted/commitlint-config globally serves as a workaround for
# achieving a zero config commitlint hook, for as long as
# https://github.com/conventional-changelog/commitlint/issues/613 isn't fixed.
#
# Once this issue is addressed it'll allow for a truly zero config conventional
# commits check, like so:
#
# npx --yes --package="@commitlint/cli" --package="@well-crafted/commitlint-config" \
# commitlint --extends "@commitlint/config-conventional" --edit
run: |
[ ! -d "$(npm -g root)/@well-crafted/commitlint-config" ] && npm i -g @well-crafted/commitlint-config
npx --yes commitlint --extends "@well-crafted/commitlint-config" --edit
pre-commit:
parallel: true
commands:
actionlint:
tags: lint build
glob: ".github/workflows/*.yml"
run: actionlint {staged_files}
hadolint:
tags: lint docker
glob: "Dockerfile*"
run: hadolint {staged_files} --failure-threshold warning
prettier:
tags: style glue
glob: "*.{json,md,yaml,yml}"
stage_fixed: true
run: prettier --write {staged_files}
shellcheck:
tags: lint shell
glob: "*.{bash,sh}"
run: shellcheck {staged_files}
shfmt:
tags: style shell
glob: "*.{bash,sh}"
stage_fixed: true
run: shfmt -w {staged_files}
yamllint:
tags: lint yaml
glob: "*.{yaml,yml}"
run: |
yamllint -d "{extends: default, rules: {line-length: {max: 120}, comments: disable}}" {staged_files}