forked from authelia/authelia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.lefthook.yml
More file actions
61 lines (53 loc) · 1.55 KB
/
Copy path.lefthook.yml
File metadata and controls
61 lines (53 loc) · 1.55 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
52
53
54
55
56
57
58
59
60
61
---
pre-commit:
piped: true
jobs:
- name: check tools
# yamllint disable rule:indentation
run: |
MISSING=""
COUNT=0
for TOOL in golangci-lint pnpm trufflehog typos yamllint; do
if ! command -v ${TOOL} >/dev/null 2>&1; then
if [ "$COUNT" -eq 0 ]; then
MISSING=${TOOL}
elif [ "$COUNT" -eq 1 ]; then
MISSING="${MISSING} and ${TOOL}"
else
MISSING="$(echo "${MISSING}" | sed 's/ and /, /') and ${TOOL}"
fi
COUNT=$((COUNT + 1))
fi
done
if [ ${COUNT} -gt 0 ]; then
echo "❌ You must install ${MISSING}"
exit 1
fi
# yamllint enable rule:indentation
- name: linters
group:
parallel: true
jobs:
- name: eslint
run: pnpm lint && echo "0 issues."
root: "web/"
glob: "*.{js,jsx,ts,tsx}"
stage_fixed: true
- name: golangci-lint
run: golangci-lint run --fix
glob: "*.go"
stage_fixed: true
- name: trufflehog
run: trufflehog --fail --log-level=-1 filesystem -x .trufflehog . && echo "0 issues."
- name: typos
run: typos -w --format brief && echo "0 issues."
stage_fixed: true
- name: yamllint
run: yamllint -f parsable . && echo "0 issues."
glob: "*.{yml,yaml}"
commit-msg:
jobs:
- name: commitlint
run: pnpm commitlint --edit
root: "web/"
...