Add shell script linting with shellcheck for better portability
This commit is contained in:
parent
ab60e702d2
commit
886a6bdbe0
15 changed files with 87 additions and 57 deletions
|
@ -11,17 +11,17 @@ GREEN=$'\033[32m'
|
|||
TEXTRESET=$'\033[0m' # reset the foreground colour
|
||||
|
||||
# -failfast -timeout=5m
|
||||
TESTFLAGS="-cover -coverprofile=cover.out ${TESTFLAGS}"
|
||||
TESTFLAGS=(-cover "-coverprofile=cover.out" "${TESTFLAGS}")
|
||||
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
TESTFLAGS="${TESTFLAGS} -v"
|
||||
TESTFLAGS+=(-v)
|
||||
elif [ -n "$VERBOSE_UNIT" ]; then
|
||||
TESTFLAGS="${TESTFLAGS} -v"
|
||||
TESTFLAGS+=(-v)
|
||||
fi
|
||||
|
||||
set +e
|
||||
|
||||
go test ${TESTFLAGS} ./pkg/...
|
||||
go test "${TESTFLAGS[@]}" ./pkg/...
|
||||
|
||||
CODE=$?
|
||||
if [ ${CODE} != 0 ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue