aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml3
-rwxr-xr-xcheck_coding_style.sh20
3 files changed, 22 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 70059e0f..68d71ab6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,5 +9,6 @@ MANIFEST
.coverage
.idea/
__pycache__
+_cffi__*
netlib.egg-info/
pathod/
diff --git a/.travis.yml b/.travis.yml
index 77ba0bcf..a1eafcea 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,8 +9,7 @@ install:
# command to run tests, e.g. python setup.py test
script:
- "nosetests --with-cov --cov-report term-missing"
- - "autopep8 -i -r -a -a . && test -z \"$(git status -s)\""
- - "autoflake -r -i --remove-all-unused-imports --remove-unused-variables . && test -z \"$(git status -s)\""
+ - "./check_coding_style.sh"
after_success:
- coveralls
notifications:
diff --git a/check_coding_style.sh b/check_coding_style.sh
new file mode 100755
index 00000000..5b38e003
--- /dev/null
+++ b/check_coding_style.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+autopep8 -i -r -a -a .
+if [[ -n "$(git status -s)" ]]; then
+ echo "autopep8 yielded the following changes:"
+ git status -s
+ git --no-pager diff
+ exit 1
+fi
+
+autoflake -i -r --remove-all-unused-imports --remove-unused-variables .
+if [[ -n "$(git status -s)" ]]; then
+ echo "autoflake yielded the following changes:"
+ git status -s
+ git --no-pager diff
+ exit 1
+fi
+
+echo "Coding style seems to be ok."
+exit 0