Skip to content

Commit 9b87a8b

Browse files
committed
Add shellcheck to Travis tests and fix existing shell lint errors.
1 parent 60deba5 commit 9b87a8b

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ addons:
1919
apt:
2020
packages:
2121
- expect
22+
- shellcheck
2223
before_install:
2324
- openssl aes-256-cbc -K $encrypted_d17a6ce39290_key -iv $encrypted_d17a6ce39290_iv
2425
-in gae-firebase-secrets.json.enc -out appengine/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/gae-firebase-secrets.json

speech/grpc/bin/speech-sample-async.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# limitations under the License.
1515

1616
SRC_DIR=$(cd "$(dirname "$0")/.."; pwd)
17-
java -cp ${SRC_DIR}/target/grpc-sample-1.0-jar-with-dependencies.jar \
17+
java -cp "${SRC_DIR}/target/grpc-sample-1.0-jar-with-dependencies.jar" \
1818
com.examples.cloud.speech.AsyncRecognizeClient "$@"

speech/grpc/bin/speech-sample-streaming.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# limitations under the License.
1515

1616
SRC_DIR=$(cd "$(dirname "$0")/.."; pwd)
17-
java -cp ${SRC_DIR}/target/grpc-sample-1.0-jar-with-dependencies.jar \
17+
java -cp "${SRC_DIR}/target/grpc-sample-1.0-jar-with-dependencies.jar" \
1818
com.examples.cloud.speech.StreamingRecognizeClient "$@"

speech/grpc/bin/speech-sample-sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# limitations under the License.
1515

1616
SRC_DIR=$(cd "$(dirname "$0")/.."; pwd)
17-
java -cp ${SRC_DIR}/target/grpc-sample-1.0-jar-with-dependencies.jar \
17+
java -cp "${SRC_DIR}/target/grpc-sample-1.0-jar-with-dependencies.jar" \
1818
com.examples.cloud.speech.SyncRecognizeClient "$@"

travis.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -x
1919
set -o pipefail
2020

2121
SKIP_TESTS=false
22-
if [ -z "$GOOGLE_APPLICATION_CREDENTIALS"]; then
22+
if [ -z "$GOOGLE_APPLICATION_CREDENTIALS" ] ; then
2323
SKIP_TESTS=true
2424
fi
2525
mvn --batch-mode clean verify -DskipTests=$SKIP_TESTS | egrep -v "(^\[INFO\] Download|^\[INFO\].*skipping)"
@@ -32,7 +32,10 @@ devserver_tests=(
3232
appengine/datastore/indexes-exploding
3333
appengine/datastore/indexes-perfect
3434
)
35-
for testdir in ${devserver_tests[@]} ; do
35+
for testdir in "${devserver_tests[@]}" ; do
3636
./java-repo-tools/scripts/test-localhost.sh appengine "${testdir}"
3737
done
3838

39+
# Check that all shell scripts in this repo (including this one) pass the
40+
# Shell Check linter.
41+
shellcheck ./**/*.sh

0 commit comments

Comments
 (0)