Skip to content

Commit

Permalink
Create non-voting tox-linters job
Browse files Browse the repository at this point in the history
This create a non-voting job using tox to run our linters entry point.
That in turn runs flake8 to validate our source is linted properly.
Because this is a non-voting job, we don't actually fail as follow up
patches will clean up the source code. Once done, we can make this job
voting and gating.

Signed-off-by: Paul Belanger <[email protected]>
  • Loading branch information
pabelanger committed Mar 26, 2018
1 parent 00e1d85 commit 853d1f6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.swp
*.swo
*.bak
.tox
8 changes: 8 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- project:
check:
jobs:
- tox-linters:
voting: false
gate:
jobs:
- noop
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8
24 changes: 24 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tox]
minversion = 1.4.2
envlist = docs,linters
skipsdist = True

[testenv]
deps = -r{toxinidir}/test-requirements.txt

[testenv:venv]
commands = {posargs}

[flake8]
show-source = True
ignore = E305,E402,E501,E722,E741,W503
builtins = _
exclude=.venv,.git,.tox,dist,doc,*egg,build

[testenv:linters]
setenv =
ANSIBLE_ROLES_PATH = ..
whitelist_externals = bash
commands =
# PEP8 Lint Check
flake8

0 comments on commit 853d1f6

Please sign in to comment.