Skip to content

Commit

Permalink
chore: bump shellcheck v0.8.0 (solana-labs#27463)
Browse files Browse the repository at this point in the history
* bump shellcheck to stable verion, v0.8.0

* fix SC2086

* fix SC2269, https://www.shellcheck.net/wiki/SC2294

* fix SC2294

* do null and unset check for variable, FORCE_DELETE
  • Loading branch information
yihau authored Sep 1, 2022
1 parent 7d17f42 commit e7689f7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ci/shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ cd "$(dirname "$0")/.."
(
set -x
git ls-files -- '*.sh' ':(exclude)ci/semver_bash' \
| xargs ci/docker-run.sh koalaman/shellcheck@sha256:fe24ab9a9b6b62d3adb162f4a80e006b6a63cae8c6ffafbae45772bab85e7294 --color=always --external-sources --shell=bash
| xargs ci/docker-run.sh koalaman/shellcheck:v0.8.0 --color=always --external-sources --shell=bash
)
echo --- ok
1 change: 1 addition & 0 deletions net/gce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ cloud_ForEachInstance() {
declare name publicIp privateIp
IFS=: read -r name publicIp privateIp zone < <(echo "$info")

# shellcheck disable=SC2294
eval "$cmd" "$name" "$publicIp" "$privateIp" "$zone" "$count" "$@"
count=$((count + 1))
done
Expand Down
6 changes: 3 additions & 3 deletions net/net.sh
Original file line number Diff line number Diff line change
Expand Up @@ -601,15 +601,15 @@ deploy() {
if $bootstrapLeader; then
SECONDS=0
declare bootstrapNodeDeployTime=
startBootstrapLeader "$nodeAddress" $nodeIndex "$netLogDir/bootstrap-validator-$ipAddress.log"
startBootstrapLeader "$nodeAddress" "$nodeIndex" "$netLogDir/bootstrap-validator-$ipAddress.log"
bootstrapNodeDeployTime=$SECONDS
$metricsWriteDatapoint "testnet-deploy net-bootnode-leader-started=1"

bootstrapLeader=false
SECONDS=0
pids=()
else
startNode "$ipAddress" $nodeType $nodeIndex
startNode "$ipAddress" "$nodeType" "$nodeIndex"

# Stagger additional node start time. If too many nodes start simultaneously
# the bootstrap node gets more rsync requests from the additional nodes than
Expand Down Expand Up @@ -1124,7 +1124,7 @@ startnode)
nodeType=
nodeIndex=
getNodeType
startNode "$nodeAddress" $nodeType $nodeIndex
startNode "$nodeAddress" "$nodeType" "$nodeIndex"
;;
startclients)
startClients
Expand Down
2 changes: 1 addition & 1 deletion net/scripts/colo-node-onfree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
SOLANA_LOCK_FILE="${SOLANA_LOCK_FILE:?}"
SECONDARY_DISK_MOUNT_POINT="${SECONDARY_DISK_MOUNT_POINT:?}"
SSH_AUTHORIZED_KEYS="${SSH_AUTHORIZED_KEYS:?}"
FORCE_DELETE="${FORCE_DELETE}"
FORCE_DELETE="${FORCE_DELETE:?}"

RC=false
if [[ -f "${SOLANA_LOCK_FILE}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion system-test/testnet-automation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Test failed during step:
${STEP}
Failure occured when running the following command:
$(eval echo "$@")"
$*"
fi

# shellcheck disable=SC2034
Expand Down

0 comments on commit e7689f7

Please sign in to comment.