From f03e5a0287c5e067adcb34f5c78533da97c1c0ac Mon Sep 17 00:00:00 2001 From: Kevin Lyda <kevin@ie.suberic.net> Date: Mon, 18 Jun 2012 01:34:18 +0100 Subject: [PATCH] Script to run pylint and converage. Changes to make it easier to check some various code quality bits. --- .gitignore | 5 +++-- MANIFEST.in | 2 +- setup.py | 2 +- tests/cq.sh | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100755 tests/cq.sh diff --git a/.gitignore b/.gitignore index 6c2d979..b0b1e02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ MANIFEST -dist -build +build/ +dist/ +htmlcov/ *.pyc *.swp .tox diff --git a/MANIFEST.in b/MANIFEST.in index 534b546..bdab56b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,4 +2,4 @@ include LICENSE OWNERS README.rst include chkcrontab include chkcrontab_lib.py include setup.py -recursive-include tests test* +recursive-include tests test* cq.sh diff --git a/setup.py b/setup.py index fcba302..c2a3ac9 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ class CleanCmd(Command): # Configure for this project. suffixes2del = ['MANIFEST', '.pyc', 'chkcrontabc'] dirs2del = ['./build', './dist', './.tox', './.coverage', - './__pycache__'] + './__pycache__', './htmlcov'] dirs2ign = ['./.git'] # End config. doomed = set() diff --git a/tests/cq.sh b/tests/cq.sh new file mode 100755 index 0000000..3d3d37e --- /dev/null +++ b/tests/cq.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# code quality reports + +# Lint +for f in chkcrontab chkcrontab_lib.py; do + pylint --rcfile=.pylintrc $f + /bin/echo -n "Completed '$f'. Next..." + read dummy +done + +# Coverage +coverage run ./setup.py test +coverage html --include=chkcrontab,chkcrontab_lib.py +open htmlcov/index.html -- GitLab