File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
4646check_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
6666check_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
106105check_go_fmt
107- result=$?
108106check_go_vet
109- (( result |= $? ))
110107check_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
You can’t perform that action at this time.
0 commit comments