Available violations¶
PEP8¶
Check your Python code against some of the style conventions in PEP 8.
.covio.yml:
violations:
pep8: pep8 . --exclude='*migrations*'
For travis-ci in .travis.yml:
before_install:
- pip install pep8
after_success:
- covio
For drone.io and jenkins in project script:
pip install pep8
COVIO_TOKEN="token" covio
sloccount¶
Count source lines of code (SLOC).
.covio.yml:
violations:
sloccount: sloccount .
For travis-ci in .travis.yml:
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq sloccount
after_success:
- covio
For drone.io and jenkins in project script:
sudo apt-get update -qq
sudo apt-get install -qq sloccount
COVIO_TOKEN="token" covio
Python unittests¶
The Python unit testing framework, sometimes referred to as “PyUnit,” is a Python language version of JUnit, by Kent Beck and Erich Gamma. JUnit is, in turn, a Java version of Kent’s Smalltalk testing framework. Each is the de facto standard unit testing framework for its respective language.
.covio.yml:
violations:
py_unittest: cat test_out
For travis-ci in .travis.yml with nose:
before_install:
- pip install nose
script:
- nosetests 2>test_out
after_success:
- covio
For travis-ci in .travis.yml with django:
script:
- ./manage.py test 2>test_out
after_success:
- covio
For drone.io and jenkins in project script with nose:
pip install nose 2>test_out
COVIO_TOKEN="token" covio
For drone.io and jenkins in project script with django:
./manage.py test 2>test_out
COVIO_TOKEN="token" covio
pip-review¶
Keeps your Python package dependencies pinned, but fresh.
.covio.yml:
violations:
pip_review: pip-review
For travis-ci in .travis.yml:
before_install:
- pip install pip-tools
after_success:
- covio
For drone.io and jenkins in project script:
pip install pep-tools
COVIO_TOKEN="token" covio
testem¶
Unit testing in Javascript can be tedious and painful, but Testem makes it so easy that you will actually want to write tests.
.covio.yml:
violations:
testem: cat testem_out
For travis-ci in .travis.yml:
script:
- testem ci > testem_out
after_success:
- covio
For drone.io and jenkins in project script:
testem ci > testem_out
COVIO_TOKEN="token" covio
coverage¶
Measure, collect, and report on code coverage in Python programs.
.covio.yml:
violations:
coverage: coverage report
For travis-ci in .travis.yml:
before_install:
- pip install coverage
after_success:
- covio
For drone.io and jenkins in project script:
pip install coverage
COVIO_TOKEN="token" covio
jslint¶
The JavaScript Verifier takes a JavaScript source and scans it.
.covio.yml:
violations:
jslint: jslint *.js
For travis-ci in .travis.yml:
before_install:
- npm install jslint
after_success:
- covio
For drone.io and jenkins in project script:
npm install jslint
COVIO_TOKEN="token" covio