Skip to content

Commit 12b3010

Browse files
author
MarcoFalke
committed
Merge #15166: qa: Pin shellcheck version
a517541 Remove no longer needed shellcheck suppressions (practicalswift) 0b7196e Fix warnings introduced in shellcheck v0.6.0 (practicalswift) 07a53dc Remove repeated suppression. Fix indentation. (practicalswift) 638e53b Pin shellcheck version to v0.6.0 (practicalswift) Pull request description: Pin `shellcheck` version. Tree-SHA512: 996e438e424020fe888de1d77ffd33fa32848332febfffbc21a842784aee339332c79c41687c9c577ba1206eb20674623157d584a072e8ae88ae086ee2277bc8
2 parents 003a47f + a517541 commit 12b3010

File tree

4 files changed

+21
-20
lines changed

4 files changed

+21
-20
lines changed

.travis/lint_04_install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ export LC_ALL=C
99
travis_retry pip install codespell==1.13.0
1010
travis_retry pip install flake8==3.5.0
1111
travis_retry pip install vulture==0.29
12+
13+
SHELLCHECK_VERSION=v0.6.0
14+
curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
15+
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"

test/lint/lint-format-strings.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@
1111
export LC_ALL=C
1212

1313
FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS=(
14-
FatalError,0
15-
fprintf,1
16-
LogConnectFailure,1
17-
LogPrint,1
18-
LogPrintf,0
19-
printf,0
20-
snprintf,2
21-
sprintf,1
22-
strprintf,0
23-
vfprintf,1
24-
vprintf,1
25-
vsnprintf,1
26-
vsprintf,1
27-
WalletLogPrintf,0
14+
"FatalError,0"
15+
"fprintf,1"
16+
"LogConnectFailure,1"
17+
"LogPrint,1"
18+
"LogPrintf,0"
19+
"printf,0"
20+
"snprintf,2"
21+
"sprintf,1"
22+
"strprintf,0"
23+
"vfprintf,1"
24+
"vprintf,1"
25+
"vsnprintf,1"
26+
"vsprintf,1"
27+
"WalletLogPrintf,0"
2828
)
2929

3030
EXIT_CODE=0

test/lint/lint-shell.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export LC_ALL=C
1313
# respectively. So export LC_ALL=C is set as required by lint-shell-locale.sh
1414
# but unset here in case of running in Travis.
1515
if [ "$TRAVIS" = "true" ]; then
16-
unset LC_ALL
16+
unset LC_ALL
1717
fi
1818

1919
if ! command -v shellcheck > /dev/null; then
@@ -24,7 +24,6 @@ fi
2424
# Disabled warnings:
2525
disabled=(
2626
SC1087 # Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
27-
SC1117 # Backslash is literal in "\.". Prefer explicit escaping: "\\.".
2827
SC2001 # See if you can use ${variable//search/replace} instead.
2928
SC2004 # $/${} is unnecessary on arithmetic variables.
3029
SC2005 # Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
@@ -36,10 +35,8 @@ disabled=(
3635
SC2066 # Since you double quoted this, it will not word split, and the loop will only run once.
3736
SC2086 # Double quote to prevent globbing and word splitting.
3837
SC2116 # Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
39-
SC2148 # Tips depend on target shell and yours is unknown. Add a shebang.
4038
SC2162 # read without -r will mangle backslashes.
41-
SC2166 # Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
42-
SC2166 # Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
39+
SC2166 # Prefer [ p ] {&&,||} [ q ] as [ p -{a,o} q ] is not well defined.
4340
SC2181 # Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
4441
SC2206 # Quote to prevent word splitting, or split robustly with mapfile or read -a.
4542
SC2207 # Prefer mapfile or read -a to split command output (or quote to avoid splitting).

test/lint/lint-whitespace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ while getopts "?" opt; do
2323
done
2424

2525
if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then
26-
if [ "$1" ]; then
26+
if [ -n "$1" ]; then
2727
TRAVIS_COMMIT_RANGE="HEAD~$1...HEAD"
2828
else
2929
TRAVIS_COMMIT_RANGE="HEAD"

0 commit comments

Comments
 (0)