From a0552e75e343a47cff9c91a6abf7cd94eb4ca2d7 Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Tue, 7 Mar 2017 13:16:01 -0500 Subject: [PATCH] Fix bashate warnings Three ((value++)) lines are generating this bashate warning: E043: Arithmetic compound has inconsistent return semantics This will now be an error when running pep8 checks. Trivialfix Change-Id: If7a63e550d5d27fe6716cc63c85426cd2250732f --- tools/check_unit_test_structure.sh | 6 +++--- tox.ini | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/check_unit_test_structure.sh b/tools/check_unit_test_structure.sh index 5341d6cf0c7..5b0eed3ff10 100755 --- a/tools/check_unit_test_structure.sh +++ b/tools/check_unit_test_structure.sh @@ -42,14 +42,14 @@ for test_file in ${test_files[@]}; do if [ ! -f "$filename" ] && [ ! -d "$package_dir" ]; then for ignore_regex in ${ignore_regexes[@]}; do if [[ "$relative_path" =~ $ignore_regex ]]; then - ((ignore_count++)) + ignore_count=$((ignore_count + 1)) continue 2 fi done echo "Unexpected test file: $base_test_path/$relative_path" - ((error_count++)) + error_count=$((error_count + 1)) fi - ((total_count++)) + total_count=$((total_count + 1)) done if [ "$ignore_count" -ne 0 ]; then diff --git a/tox.ini b/tox.ini index b7e68552414..61b234b2c0b 100644 --- a/tox.ini +++ b/tox.ini @@ -138,7 +138,8 @@ commands = bash -c "find {toxinidir} \ # E005 file does not begin with #! or have a .sh prefix # E006 check for lines longer than 79 columns # E042 local declaration hides errors - -print0 | xargs -0 bashate -v -iE006 -eE005,E042" +# E043 Arithmetic compound has inconsistent return semantics + -print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043" [testenv:genconfig] commands = {toxinidir}/tools/generate_config_file_samples.sh