~harlowja/cloud-init/tox-venvs

« back to all changes in this revision

Viewing changes to tools/run-pylint

  • Committer: Joshua Harlow
  • Date: 2014-01-26 01:00:38 UTC
  • Revision ID: harlowja@gmail.com-20140126010038-smsyr4lztcjrpk81
Use a venv for testing and for lint checking

Remove the pep8 & pylint tools and use a venv
with tox instead. Also create a venv that will
run for the given python version to perform the
cloud-init tests.

These help remove the need to install the same
dependencies in the root python environment env
to just run the standard set of tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
 
3
 
if [ $# -eq 0 ]; then
4
 
   files=( bin/cloud-init $(find * -name "*.py" -type f) )
5
 
else
6
 
   files=( "$@" );
7
 
fi 
8
 
 
9
 
RC_FILE="pylintrc"
10
 
if [ ! -f $RC_FILE ]; then
11
 
    RC_FILE="../pylintrc"
12
 
fi
13
 
 
14
 
cmd=(
15
 
    pylint
16
 
    --rcfile=$RC_FILE
17
 
    --disable=R
18
 
    --disable=I
19
 
    --dummy-variables-rgx="_"
20
 
    "${files[@]}"
21
 
)
22
 
 
23
 
echo -e "\nRunning pylint:"
24
 
echo "${cmd[@]}"
25
 
"${cmd[@]}"
26