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
This commit is contained in:
parent
4118ea2e7b
commit
a0552e75e3
@ -42,14 +42,14 @@ for test_file in ${test_files[@]}; do
|
|||||||
if [ ! -f "$filename" ] && [ ! -d "$package_dir" ]; then
|
if [ ! -f "$filename" ] && [ ! -d "$package_dir" ]; then
|
||||||
for ignore_regex in ${ignore_regexes[@]}; do
|
for ignore_regex in ${ignore_regexes[@]}; do
|
||||||
if [[ "$relative_path" =~ $ignore_regex ]]; then
|
if [[ "$relative_path" =~ $ignore_regex ]]; then
|
||||||
((ignore_count++))
|
ignore_count=$((ignore_count + 1))
|
||||||
continue 2
|
continue 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Unexpected test file: $base_test_path/$relative_path"
|
echo "Unexpected test file: $base_test_path/$relative_path"
|
||||||
((error_count++))
|
error_count=$((error_count + 1))
|
||||||
fi
|
fi
|
||||||
((total_count++))
|
total_count=$((total_count + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$ignore_count" -ne 0 ]; then
|
if [ "$ignore_count" -ne 0 ]; then
|
||||||
|
3
tox.ini
3
tox.ini
@ -138,7 +138,8 @@ commands = bash -c "find {toxinidir} \
|
|||||||
# E005 file does not begin with #! or have a .sh prefix
|
# E005 file does not begin with #! or have a .sh prefix
|
||||||
# E006 check for lines longer than 79 columns
|
# E006 check for lines longer than 79 columns
|
||||||
# E042 local declaration hides errors
|
# 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]
|
[testenv:genconfig]
|
||||||
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user