-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
27 lines (22 loc) · 917 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
language: python
python:
- 2.7
install:
- pip install -r requirements.txt
- pip install -r requirements-test.txt autopep8
script:
- nosetests
- find . -name \*.py -exec flake8 --ignore=E402 {} +
# Run pep8 on all .py files in all subfolders
# We must ignore E402 module level import not at top of file
# because of use case sys.path.append('..'); import <module>
- num_errors_before=`find . -name \*.py -exec flake8 --ignore=E402 {} + | wc -l`
- echo $num_errors_before
- find . -name \*.py -exec autopep8 --recursive --aggressive --aggressive --in-place {} +
- num_errors_after=`find . -name \*.py -exec flake8 --ignore=E402 {} + | wc -l`
- echo $num_errors_after
- |
if (( $num_errors_after < $num_errors_before )); then
echo "there are a number of pep8 cleanups that autopep8 can fix please run that"
git diff
fi