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
This commit is contained in:
Clark Boylan 2019-05-23 14:00:37 -07:00
parent f671c38fa7
commit 926ba11184
2 changed files with 9 additions and 5 deletions

View File

@ -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"

View File

@ -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