Skip to content

Commit

Permalink
fixed linters
Browse files Browse the repository at this point in the history
* implemented workaround for ansible/ansible-lint#590
* bumped linter versions
* added missing proxy variables to passenv
* removed uneccesary use of hacking with flake8 hook

Change-Id: I3f50f27bf349be6ceb5dc303e206ec83abe3c458
  • Loading branch information
ssbarnea committed Oct 17, 2019
1 parent 39bb0d6 commit 747f4b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
rev: v2.3.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
Expand All @@ -10,11 +10,9 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- id: flake8
additional_dependencies:
- hacking<1.2.0,>=1.1.0
- id: check-yaml
files: .*\.(yaml|yml)$
# commented to allow progressive enablement in smaller patches
# commented to allow progressive adoption in smaller patches
# - repo: https://github.com/adrienverge/yamllint.git
# rev: v1.13.0
# hooks:
Expand All @@ -23,7 +21,7 @@ repos:
# types: [file, yaml]
# entry: yamllint --strict -f parsable
- repo: https://github.com/ansible/ansible-lint
rev: v4.1.0a0
rev: v4.1.1a0
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
Expand Down
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1
passenv =
ANSIBLE_*
CURL_CA_BUNDLE
DOCKER_*
MOLECULE_*
REQUESTS_CA_BUNDLE
SSH_AUTH_SOCK
SSL_CERT_FILE
TERM

deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
whitelist_externals =
Expand All @@ -39,6 +41,10 @@ commands =
commands = {posargs}

[testenv:linters]
deps =
# workaround for https://github.com/ansible/ansible-lint/issues/590
virtualenv==16.3.0 # 16.7.6 not working
pre-commit
commands =
python -m pre_commit run -a

Expand Down

0 comments on commit 747f4b8

Please sign in to comment.