-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathverify.sh
More file actions
executable file
·41 lines (35 loc) · 790 Bytes
/
Copy pathverify.sh
File metadata and controls
executable file
·41 lines (35 loc) · 790 Bytes
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
#!/bin/sh
verboseFlag=""
if [ "$1" = "-v" ]; then
verboseFlag="-v"
else
echo "If you need more detail information, please set -v flag"
fi
if [ ! -d "node_modules" ]; then
npm i
fi
npx cspell lint '**/*.go' -c ./.cspell/cspell.cjs --gitignore --show-suggestions --no-progress
if [ $? -ne 0 ]; then
echo "## failed to run 'cspell'. ##"
exit $?
fi
go vet $verboseFlag ./...
if [ $? -ne 0 ]; then
echo "## failed to run 'go vet'. ##"
exit $?
fi
golangci-lint run
if [ $? -ne 0 ]; then
echo "## failed to run 'golangci-lint'. ##"
exit $?
fi
go test $verboseFlag -covermode=count ./...
if [ $? -ne 0 ]; then
echo "## failed to run 'go test'. ##"
exit $?
fi
go build
if [ $? -ne 0 ]; then
echo "## failed to run 'go build'. ##"
exit $?
fi