Linters fix-refresh

- bumped linters
- enabled two more checks and fixed them
- cleaned tox.ini file

Change-Id: I597c1acb549ebce86fdc1f48487612db6c607f24
This commit is contained in:
Sorin Sbarnea 2020-02-26 18:46:36 +00:00
parent 667434da11
commit 4ad92f255f
9 changed files with 17 additions and 26 deletions

1
.gitignore vendored
View File

@ -66,4 +66,3 @@ releasenotes/build
# Editors
.*.sw[klmnop]

View File

@ -3,4 +3,3 @@ host=review.opendev.org
port=29418
project=openstack/tripleo-upgrade.git
defaultbranch=master

View File

@ -1,13 +1,15 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
rev: v2.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: flake8
additional_dependencies:
@ -15,23 +17,28 @@ repos:
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.13.0
rev: v1.20.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict -f parsable
- repo: https://github.com/ansible/ansible-lint
rev: v4.1.1a2
- repo: https://github.com/ansible/ansible-lint.git
rev: v4.2.0
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
entry: ansible-lint --force-color -v
always_run: true
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
rev: 0.6.0
hooks:
- id: bashate
entry: bashate --error . --verbose --ignore=E006,E040
entry: bashate --error . --ignore=E006,E040
# Run bashate check for all bash scripts
# Ignores the following rules:
# E006: Line longer than 79 columns (as many scripts use jinja

View File

@ -36,4 +36,3 @@ universal = 1
[pbr]
skip_authors = True
skip_changelog = True

View File

@ -44,5 +44,3 @@ while true; do
fi
fi
done

View File

@ -4,4 +4,3 @@ set -euo pipefail
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

View File

@ -53,5 +53,3 @@ openstack overcloud external-upgrade run \
echo "[$(date)] Finished system upgrade transfer data for {{ item }} role"
{% endif -%}

View File

@ -1 +1 @@
localhost
localhost

12
tox.ini
View File

@ -34,22 +34,14 @@ basepython = python3
deps = bindep
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]
basepython = python3
envdir = {toxworkdir}/linters
commands =
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/molecule/roles.galaxy' \
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]
basepython = python3