Linters fix-refresh
- bumped linters - enabled two more checks and fixed them - cleaned tox.ini file Change-Id: I597c1acb549ebce86fdc1f48487612db6c607f24
This commit is contained in:
parent
667434da11
commit
4ad92f255f
1
.gitignore
vendored
1
.gitignore
vendored
@ -66,4 +66,3 @@ releasenotes/build
|
|||||||
|
|
||||||
# Editors
|
# Editors
|
||||||
.*.sw[klmnop]
|
.*.sw[klmnop]
|
||||||
|
|
||||||
|
@ -3,4 +3,3 @@ host=review.opendev.org
|
|||||||
port=29418
|
port=29418
|
||||||
project=openstack/tripleo-upgrade.git
|
project=openstack/tripleo-upgrade.git
|
||||||
defaultbranch=master
|
defaultbranch=master
|
||||||
|
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
---
|
---
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v2.0.0
|
rev: v2.4.0
|
||||||
hooks:
|
hooks:
|
||||||
|
- id: end-of-file-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
- id: check-byte-order-marker
|
- id: check-byte-order-marker
|
||||||
- id: check-executables-have-shebangs
|
- id: check-executables-have-shebangs
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
|
- id: check-symlinks
|
||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
- id: flake8
|
- id: flake8
|
||||||
additional_dependencies:
|
additional_dependencies:
|
||||||
@ -15,23 +17,28 @@ repos:
|
|||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
files: .*\.(yaml|yml)$
|
files: .*\.(yaml|yml)$
|
||||||
- repo: https://github.com/adrienverge/yamllint.git
|
- repo: https://github.com/adrienverge/yamllint.git
|
||||||
rev: v1.13.0
|
rev: v1.20.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: yamllint
|
- id: yamllint
|
||||||
files: \.(yaml|yml)$
|
files: \.(yaml|yml)$
|
||||||
types: [file, yaml]
|
types: [file, yaml]
|
||||||
entry: yamllint --strict -f parsable
|
entry: yamllint --strict -f parsable
|
||||||
- repo: https://github.com/ansible/ansible-lint
|
- repo: https://github.com/ansible/ansible-lint.git
|
||||||
rev: v4.1.1a2
|
rev: v4.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: ansible-lint
|
- id: ansible-lint
|
||||||
files: \.(yaml|yml)$
|
always_run: true
|
||||||
entry: ansible-lint --force-color -v
|
pass_filenames: false
|
||||||
|
# do not add file filters here as ansible-lint does not give reliable
|
||||||
|
# results when called with individual files.
|
||||||
|
# https://github.com/ansible/ansible-lint/issues/611
|
||||||
|
verbose: true
|
||||||
|
entry: env ANSIBLE_LIBRARY=library ansible-lint --force-color -p -v
|
||||||
- repo: https://github.com/openstack-dev/bashate.git
|
- repo: https://github.com/openstack-dev/bashate.git
|
||||||
rev: 0.6.0
|
rev: 0.6.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: bashate
|
- id: bashate
|
||||||
entry: bashate --error . --verbose --ignore=E006,E040
|
entry: bashate --error . --ignore=E006,E040
|
||||||
# Run bashate check for all bash scripts
|
# Run bashate check for all bash scripts
|
||||||
# Ignores the following rules:
|
# Ignores the following rules:
|
||||||
# E006: Line longer than 79 columns (as many scripts use jinja
|
# E006: Line longer than 79 columns (as many scripts use jinja
|
||||||
|
@ -36,4 +36,3 @@ universal = 1
|
|||||||
[pbr]
|
[pbr]
|
||||||
skip_authors = True
|
skip_authors = True
|
||||||
skip_changelog = True
|
skip_changelog = True
|
||||||
|
|
||||||
|
@ -44,5 +44,3 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,4 +4,3 @@ set -euo pipefail
|
|||||||
|
|
||||||
source {{ undercloud_rc }}
|
source {{ undercloud_rc }}
|
||||||
openstack overcloud ffwd-upgrade run --yes --stack {{ overcloud_stack_name }} {% if overcloud_ssh_user != '' %} --ssh-user {{ overcloud_ssh_user }} {% endif %} | tee {{ working_dir}}/overcloud_upgrade_run.log
|
openstack overcloud ffwd-upgrade run --yes --stack {{ overcloud_stack_name }} {% if overcloud_ssh_user != '' %} --ssh-user {{ overcloud_ssh_user }} {% endif %} | tee {{ working_dir}}/overcloud_upgrade_run.log
|
||||||
|
|
||||||
|
@ -53,5 +53,3 @@ openstack overcloud external-upgrade run \
|
|||||||
|
|
||||||
echo "[$(date)] Finished system upgrade transfer data for {{ item }} role"
|
echo "[$(date)] Finished system upgrade transfer data for {{ item }} role"
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
localhost
|
localhost
|
||||||
|
12
tox.ini
12
tox.ini
@ -34,22 +34,14 @@ basepython = python3
|
|||||||
deps = bindep
|
deps = bindep
|
||||||
commands = bindep test
|
commands = bindep test
|
||||||
|
|
||||||
[testenv:bashate]
|
|
||||||
envdir = {toxworkdir}/linters
|
|
||||||
commands =
|
|
||||||
python -m pre_commit run bashate --all-files
|
|
||||||
|
|
||||||
[testenv:pep8]
|
|
||||||
envdir = {toxworkdir}/linters
|
|
||||||
commands =
|
|
||||||
python -m pre_commit run flake8 --all-files
|
|
||||||
|
|
||||||
[testenv:ansible-lint]
|
[testenv:ansible-lint]
|
||||||
|
basepython = python3
|
||||||
envdir = {toxworkdir}/linters
|
envdir = {toxworkdir}/linters
|
||||||
commands =
|
commands =
|
||||||
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/molecule/roles.galaxy' \
|
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/molecule/roles.galaxy' \
|
||||||
ansible-galaxy install -fr {toxinidir}/molecule/ansible-role-requirements.yml"
|
ansible-galaxy install -fr {toxinidir}/molecule/ansible-role-requirements.yml"
|
||||||
python -m pre_commit run ansible-lint -a
|
python -m pre_commit run -a
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user