diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-05-31 01:51:31 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-05-31 01:51:31 +0200 |
commit | ec92fca8c030fe5971a034a658033f70965b990a (patch) | |
tree | ef9a2049eeab539d13e1f9662fd51220ab4ee817 /check_coding_style.sh | |
parent | 0f8e8ee1ad667c8d747d5876f9b630ecbc01d7e9 (diff) | |
parent | a05a70d8168a07c92b2a3ecbbb1958d85532efe3 (diff) | |
download | mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.gz mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.tar.bz2 mitmproxy-ec92fca8c030fe5971a034a658033f70965b990a.zip |
Merge branch 'master' of github.com:mitmproxy/mitmproxy
Diffstat (limited to 'check_coding_style.sh')
-rwxr-xr-x | check_coding_style.sh | 20 |
1 files changed, 20 insertions, 0 deletions
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 |