-
Notifications
You must be signed in to change notification settings - Fork 34
/
build
executable file
·61 lines (49 loc) · 831 Bytes
/
build
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
#!/bin/sh
unset IFS
set -euf
DEFAULT_TASK='lint'
audit() {
snyk
}
lint() {
bashate
funk
kirill
shellcheck
shfmt
slick
}
bashate() {
stank -print0 -exInterp zsh . |
xargs -0 -n 1 .venv/bin/bashate -i E006
}
funk() {
command funk .
}
kirill() {
command kirill -print0 . |
xargs -0 -n 1 -t jq -r input_filename
}
shellcheck() {
stank -print0 -exInterp zsh . |
xargs -0 -n 1 shellcheck
}
shfmt() {
stank -print0 -exInterp zsh . |
xargs -0 -n 1 shfmt -w -i 4
}
slick() {
stank -print0 -sh . |
xargs -0 -n 1 slick
}
snyk() {
command snyk test --all-projects --exclude=requirements.txt
command snyk test --command=.venv/bin/python3
}
if [ "$#" -eq 0 ]; then
"$DEFAULT_TASK"
exit
fi
for ARG in "$@"; do
"$ARG"
done