Skip to content

Commit a4e490d

Browse files
committed
Revert "Run all tests instead of exiting at first failure (keybase#5554)"
This reverts commit 1606365.
1 parent 44e35d7 commit a4e490d

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

‎git-hooks/pre-commit‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
# Copyright 2012 The Go Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style
44
# license that can be found in the LICENSE file.
@@ -40,7 +40,7 @@ check_go_fmt() {
4040
echo >&2 " gofmt -w $PWD/$fn"
4141
done
4242

43-
return 1
43+
exit 1
4444
}
4545

4646
check_go_vet() {
@@ -60,13 +60,13 @@ check_go_vet() {
6060
echo >&2 "go vet found issues:"
6161
echo >&2 $warnings
6262

63-
return 1
63+
exit 1
6464
}
6565

6666
check_make_lint() {
6767
if ! which golint > /dev/null 2>&1 ; then
6868
echo >&2 "golint is not installed"
69-
return 1
69+
exit 1
7070
fi
7171
# Try the root dir. If that doesn't work, see if there's a go subdir.
7272
lint=$(make -s lint 2> /dev/null)
@@ -79,7 +79,7 @@ check_make_lint() {
7979
echo >&2 "go lint found issues:"
8080
echo >&2 "$lint"
8181

82-
return 1
82+
exit 1
8383
}
8484

8585
#
@@ -94,21 +94,16 @@ check_path_Join()
9494
echo >&2 "path.Join() does not work on all platforms. Use filepath.Join instead."
9595
echo >&2 "$file"
9696
echo "$pathjoins"
97-
return 1
97+
exit 1
9898
fi
9999
done
100-
return 0
101100
}
102101

103102

104103
#-----------------------------------------------------------------------------
105104

106105
check_go_fmt
107-
result=$?
108106
check_go_vet
109-
((result |= $?))
110107
check_make_lint
111-
((result |= $?))
112108
# removed call to check_path_Join here because path.Join is
113109
# completely valid and useful to make URL paths, for example.
114-
exit $result

0 commit comments

Comments
 (0)