Fix linters error and enable linters zuul gate
Fix below linters errors and exclude openstack path for linter E003 Indent not multiple of 4 E011 Then keyword is not on same line as if or elif keyword E001 Trailing Whitespace ignore : E006 Line too long Story: 2003372 Task: 24435 Change-Id: I9221fc4c07633c49d8a7cb9afa0f6a1624304cb9 Signed-off-by: Sun Austin <austin.sun@intel.com>
This commit is contained in:
parent
17312ac4d0
commit
f01fd03136
|
@ -3,8 +3,8 @@
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
|
- openstack-tox-linters
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
|
- openstack-tox-linters
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
backup_dir="/opt/backups"
|
backup_dir="/opt/backups"
|
||||||
tmp_dir="${backup_dir}/image_temp"
|
tmp_dir="${backup_dir}/image_temp"
|
||||||
|
|
||||||
|
@ -133,8 +132,7 @@ if [ $EUID -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# -ne 2 ] ;
|
if [ $# -ne 2 ]; then
|
||||||
then
|
|
||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -209,4 +207,3 @@ elif [ "$1" = "import" ]; then
|
||||||
else
|
else
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
10
tox.ini
10
tox.ini
|
@ -14,6 +14,8 @@ deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
|
#bashate ignore
|
||||||
|
#E006 Line too long
|
||||||
commands =
|
commands =
|
||||||
bash -c "find {toxinidir} \
|
bash -c "find {toxinidir} \
|
||||||
-not \( -type d -name .?\* -prune \) \
|
-not \( -type d -name .?\* -prune \) \
|
||||||
|
@ -21,11 +23,11 @@ commands =
|
||||||
-not -name \*~ \
|
-not -name \*~ \
|
||||||
-not -name \*.md \
|
-not -name \*.md \
|
||||||
-name \*.sh \
|
-name \*.sh \
|
||||||
-print0 | xargs -0 bashate -v"
|
-print0 | xargs -0 bashate -v -i E006"
|
||||||
bash -c "find {toxinidir} \
|
bash -c "find {toxinidir} \
|
||||||
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
|
\( -path '{toxinidir}/openstack/python-heat/python-heat/templates*' \
|
||||||
-o \( -name .tox -prune \) \
|
-o -path '{toxinidir}/.tox' \) -a -prune \
|
||||||
-o -type f -name '*.yaml' \
|
-o -name '*.yaml' \
|
||||||
-print0 | xargs -0 yamllint"
|
-print0 | xargs -0 yamllint"
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
|
Loading…
Reference in New Issue