Merge #15166: qa: Pin shellcheck version
a517541794Remove no longer needed shellcheck suppressions (practicalswift)0b7196ecadFix warnings introduced in shellcheck v0.6.0 (practicalswift)07a53dce9fRemove repeated suppression. Fix indentation. (practicalswift)638e53b472Pin shellcheck version to v0.6.0 (practicalswift) Pull request description: Pin `shellcheck` version. Tree-SHA512: 996e438e424020fe888de1d77ffd33fa32848332febfffbc21a842784aee339332c79c41687c9c577ba1206eb20674623157d584a072e8ae88ae086ee2277bc8
This commit is contained in:
4 files changed
+21
-20
No files matched your search
@@ -9,3 +9,7 @@ export LC_ALL=C
|
|||||||
travis_retry pip install codespell==1.13.0
|
travis_retry pip install codespell==1.13.0
|
||||||
travis_retry pip install flake8==3.5.0
|
travis_retry pip install flake8==3.5.0
|
||||||
travis_retry pip install vulture==0.29
|
travis_retry pip install vulture==0.29
|
||||||
|
|
||||||
|
SHELLCHECK_VERSION=v0.6.0
|
||||||
|
curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
|
||||||
|
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
|
||||||
@@ -11,20 +11,20 @@
|
|||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS=(
|
FUNCTION_NAMES_AND_NUMBER_OF_LEADING_ARGUMENTS=(
|
||||||
FatalError,0
|
"FatalError,0"
|
||||||
fprintf,1
|
"fprintf,1"
|
||||||
LogConnectFailure,1
|
"LogConnectFailure,1"
|
||||||
LogPrint,1
|
"LogPrint,1"
|
||||||
LogPrintf,0
|
"LogPrintf,0"
|
||||||
printf,0
|
"printf,0"
|
||||||
snprintf,2
|
"snprintf,2"
|
||||||
sprintf,1
|
"sprintf,1"
|
||||||
strprintf,0
|
"strprintf,0"
|
||||||
vfprintf,1
|
"vfprintf,1"
|
||||||
vprintf,1
|
"vprintf,1"
|
||||||
vsnprintf,1
|
"vsnprintf,1"
|
||||||
vsprintf,1
|
"vsprintf,1"
|
||||||
WalletLogPrintf,0
|
"WalletLogPrintf,0"
|
||||||
)
|
)
|
||||||
|
|
||||||
EXIT_CODE=0
|
EXIT_CODE=0
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export LC_ALL=C
|
|||||||
# respectively. So export LC_ALL=C is set as required by lint-shell-locale.sh
|
# respectively. So export LC_ALL=C is set as required by lint-shell-locale.sh
|
||||||
# but unset here in case of running in Travis.
|
# but unset here in case of running in Travis.
|
||||||
if [ "$TRAVIS" = "true" ]; then
|
if [ "$TRAVIS" = "true" ]; then
|
||||||
unset LC_ALL
|
unset LC_ALL
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v shellcheck > /dev/null; then
|
if ! command -v shellcheck > /dev/null; then
|
||||||
@@ -24,7 +24,6 @@ fi
|
|||||||
# Disabled warnings:
|
# Disabled warnings:
|
||||||
disabled=(
|
disabled=(
|
||||||
SC1087 # Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
|
SC1087 # Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
|
||||||
SC1117 # Backslash is literal in "\.". Prefer explicit escaping: "\\.".
|
|
||||||
SC2001 # See if you can use ${variable//search/replace} instead.
|
SC2001 # See if you can use ${variable//search/replace} instead.
|
||||||
SC2004 # $/${} is unnecessary on arithmetic variables.
|
SC2004 # $/${} is unnecessary on arithmetic variables.
|
||||||
SC2005 # Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
|
SC2005 # Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
|
||||||
@@ -36,10 +35,8 @@ disabled=(
|
|||||||
SC2066 # Since you double quoted this, it will not word split, and the loop will only run once.
|
SC2066 # Since you double quoted this, it will not word split, and the loop will only run once.
|
||||||
SC2086 # Double quote to prevent globbing and word splitting.
|
SC2086 # Double quote to prevent globbing and word splitting.
|
||||||
SC2116 # Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
|
SC2116 # Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
|
||||||
SC2148 # Tips depend on target shell and yours is unknown. Add a shebang.
|
|
||||||
SC2162 # read without -r will mangle backslashes.
|
SC2162 # read without -r will mangle backslashes.
|
||||||
SC2166 # Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
|
SC2166 # Prefer [ p ] {&&,||} [ q ] as [ p -{a,o} q ] is not well defined.
|
||||||
SC2166 # Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
|
|
||||||
SC2181 # Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
|
SC2181 # Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
|
||||||
SC2206 # Quote to prevent word splitting, or split robustly with mapfile or read -a.
|
SC2206 # Quote to prevent word splitting, or split robustly with mapfile or read -a.
|
||||||
SC2207 # Prefer mapfile or read -a to split command output (or quote to avoid splitting).
|
SC2207 # Prefer mapfile or read -a to split command output (or quote to avoid splitting).
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ while getopts "?" opt; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then
|
if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then
|
||||||
if [ "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
TRAVIS_COMMIT_RANGE="HEAD~$1...HEAD"
|
TRAVIS_COMMIT_RANGE="HEAD~$1...HEAD"
|
||||||
else
|
else
|
||||||
TRAVIS_COMMIT_RANGE="HEAD"
|
TRAVIS_COMMIT_RANGE="HEAD"
|
||||||
|
|||||||
Reference in new issue
Block a user