chore: bump shellcheck v0.8.0 (#27463)
* 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
This commit is contained in:
parent
7d17f423f3
commit
e7689f7961
|
@ -7,6 +7,6 @@ cd "$(dirname "$0")/.."
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
git ls-files -- '*.sh' ':(exclude)ci/semver_bash' \
|
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
|
echo --- ok
|
||||||
|
|
|
@ -397,6 +397,7 @@ cloud_ForEachInstance() {
|
||||||
declare name publicIp privateIp
|
declare name publicIp privateIp
|
||||||
IFS=: read -r name publicIp privateIp zone < <(echo "$info")
|
IFS=: read -r name publicIp privateIp zone < <(echo "$info")
|
||||||
|
|
||||||
|
# shellcheck disable=SC2294
|
||||||
eval "$cmd" "$name" "$publicIp" "$privateIp" "$zone" "$count" "$@"
|
eval "$cmd" "$name" "$publicIp" "$privateIp" "$zone" "$count" "$@"
|
||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
done
|
done
|
||||||
|
|
|
@ -601,7 +601,7 @@ deploy() {
|
||||||
if $bootstrapLeader; then
|
if $bootstrapLeader; then
|
||||||
SECONDS=0
|
SECONDS=0
|
||||||
declare bootstrapNodeDeployTime=
|
declare bootstrapNodeDeployTime=
|
||||||
startBootstrapLeader "$nodeAddress" $nodeIndex "$netLogDir/bootstrap-validator-$ipAddress.log"
|
startBootstrapLeader "$nodeAddress" "$nodeIndex" "$netLogDir/bootstrap-validator-$ipAddress.log"
|
||||||
bootstrapNodeDeployTime=$SECONDS
|
bootstrapNodeDeployTime=$SECONDS
|
||||||
$metricsWriteDatapoint "testnet-deploy net-bootnode-leader-started=1"
|
$metricsWriteDatapoint "testnet-deploy net-bootnode-leader-started=1"
|
||||||
|
|
||||||
|
@ -609,7 +609,7 @@ deploy() {
|
||||||
SECONDS=0
|
SECONDS=0
|
||||||
pids=()
|
pids=()
|
||||||
else
|
else
|
||||||
startNode "$ipAddress" $nodeType $nodeIndex
|
startNode "$ipAddress" "$nodeType" "$nodeIndex"
|
||||||
|
|
||||||
# Stagger additional node start time. If too many nodes start simultaneously
|
# Stagger additional node start time. If too many nodes start simultaneously
|
||||||
# the bootstrap node gets more rsync requests from the additional nodes than
|
# the bootstrap node gets more rsync requests from the additional nodes than
|
||||||
|
@ -1124,7 +1124,7 @@ startnode)
|
||||||
nodeType=
|
nodeType=
|
||||||
nodeIndex=
|
nodeIndex=
|
||||||
getNodeType
|
getNodeType
|
||||||
startNode "$nodeAddress" $nodeType $nodeIndex
|
startNode "$nodeAddress" "$nodeType" "$nodeIndex"
|
||||||
;;
|
;;
|
||||||
startclients)
|
startclients)
|
||||||
startClients
|
startClients
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
SOLANA_LOCK_FILE="${SOLANA_LOCK_FILE:?}"
|
SOLANA_LOCK_FILE="${SOLANA_LOCK_FILE:?}"
|
||||||
SECONDARY_DISK_MOUNT_POINT="${SECONDARY_DISK_MOUNT_POINT:?}"
|
SECONDARY_DISK_MOUNT_POINT="${SECONDARY_DISK_MOUNT_POINT:?}"
|
||||||
SSH_AUTHORIZED_KEYS="${SSH_AUTHORIZED_KEYS:?}"
|
SSH_AUTHORIZED_KEYS="${SSH_AUTHORIZED_KEYS:?}"
|
||||||
FORCE_DELETE="${FORCE_DELETE}"
|
FORCE_DELETE="${FORCE_DELETE:?}"
|
||||||
|
|
||||||
RC=false
|
RC=false
|
||||||
if [[ -f "${SOLANA_LOCK_FILE}" ]]; then
|
if [[ -f "${SOLANA_LOCK_FILE}" ]]; then
|
||||||
|
|
|
@ -13,7 +13,7 @@ Test failed during step:
|
||||||
${STEP}
|
${STEP}
|
||||||
|
|
||||||
Failure occured when running the following command:
|
Failure occured when running the following command:
|
||||||
$(eval echo "$@")"
|
$*"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
|
|
Loading…
Reference in New Issue