Lint Rules

Adding a tox.ini to allow lint to happen over the code.  This
also allows commits to land.  unit tests will be forthcoming
when https://github.com/juju/charm-tools/issues/249 is
resolved.

Change-Id: I8140ced05d1898f7561337e0e1f82570e0fcbcaa
This commit is contained in:
Chris Holcombe 2017-03-20 14:35:19 -07:00
parent d770358356
commit dd7b6204fa
4 changed files with 51 additions and 0 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
.idea
*.swp
.testrepository
.tox

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/charm-interface-ceph-mds

2
test-requirements.txt Normal file
View File

@ -0,0 +1,2 @@
flake8>=2.2.4,<=2.4.1
os-testr>=0.4.1

43
tox.ini Normal file
View File

@ -0,0 +1,43 @@
[tox]
envlist = pep8,py27,py34,py35
skipsdist = True
skip_missing_interpreters = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
install_command =
pip install --allow-unverified python-apt {opts} {packages}
commands = ostestr {posargs}
[testenv:py27]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
# https://github.com/juju/charm-tools/issues/249
commands = /bin/true
[testenv:py34]
basepython = python3.4
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
# https://github.com/juju/charm-tools/issues/249
commands = /bin/true
[testenv:py35]
basepython = python3.5
deps = -r{toxinidir}/test-requirements.txt
# TODO: Need to write unit tests then remove the following command.
# https://github.com/juju/charm-tools/issues/249
commands = /bin/true
[testenv:pep8]
basepython = python2.7
deps = -r{toxinidir}/test-requirements.txt
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[flake8]
ignore = E402,E226