aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/check_coding_style.sh
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-02-15 14:58:48 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-02-15 14:58:48 +0100
commit43c3e164ecf13b2d0909f748c2c61f39e197659e (patch)
treec3dd47b72a40416706518904f557b763f38e999b /netlib/check_coding_style.sh
parent33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04 (diff)
parentaafa69a73829a7ec291a2d6fa0c4522caf287d17 (diff)
downloadmitmproxy-43c3e164ecf13b2d0909f748c2c61f39e197659e.tar.gz
mitmproxy-43c3e164ecf13b2d0909f748c2c61f39e197659e.tar.bz2
mitmproxy-43c3e164ecf13b2d0909f748c2c61f39e197659e.zip
add netlib
Diffstat (limited to 'netlib/check_coding_style.sh')
-rwxr-xr-xnetlib/check_coding_style.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/netlib/check_coding_style.sh b/netlib/check_coding_style.sh
new file mode 100755
index 00000000..a1c94e03
--- /dev/null
+++ b/netlib/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 0 # don't be so strict about coding style errors
+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 0 # don't be so strict about coding style errors
+fi
+
+echo "Coding style seems to be ok."
+exit 0