From 926ba11184d4072d709fde0a5d7850a59c86237b Mon Sep 17 00:00:00 2001 From: Clark Boylan <clark.boylan@gmail.com> Date: Thu, 23 May 2019 14:00:37 -0700 Subject: [PATCH] Cleanup bashate errors to make them easier to understand We ignore E006 which is line lenght longer than 79 characters. We don't actually care about that. Fix E042 in run_all.sh this represents a potential real issue in bash as it will hide errors. This makes the bashate output much cleaner which should make it easier for people to understand why it fails when it fails in check. Change-Id: I2249b76e33003b57a1d2ab5fcdb17eda4e5cd7ad --- run_all.sh | 12 ++++++++---- tools/run-bashate.sh | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/run_all.sh b/run_all.sh index 33f7927661..92f6acd4cd 100755 --- a/run_all.sh +++ b/run_all.sh @@ -45,10 +45,14 @@ function send_timer { return fi - local current=$(date '+%s') - local name=$1 - local start=${2-$_START_TIME} - local elapsed_ms=$(( (current - start) * 1000 )) + local current + current=$(date '+%s') + local name + name=$1 + local start + start=${2-$_START_TIME} + local elapsed_ms + elapsed_ms=$(( (current - start) * 1000 )) echo "bridge.ansible.run_all.${name}:${elapsed_ms}|ms" | nc -w 1 -u graphite.opendev.org 8125 echo "End $name" diff --git a/tools/run-bashate.sh b/tools/run-bashate.sh index 3fdefe1b70..ee166fd46d 100755 --- a/tools/run-bashate.sh +++ b/tools/run-bashate.sh @@ -1,4 +1,4 @@ #!/bin/bash ROOT=$(readlink -fn $(dirname $0)/.. ) -find $ROOT -not -wholename \*.tox/\* -and \( -name \*.sh -or -name \*rc -or -name functions\* \) -print0 | xargs -0 bashate -v +find $ROOT -not -wholename \*.tox/\* -and \( -name \*.sh -or -name \*rc -or -name functions\* \) -print0 | xargs -0 bashate -i E006 -v