aboutsummaryrefslogtreecommitdiff
path: root/tests/t_codingstandard.sh
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-03-09 09:32:23 +0100
committerKarel Kočí <cynerd@email.cz>2016-03-09 09:32:23 +0100
commita149a27041e90674f34228e7ef1b05b6f1a61ca5 (patch)
tree0fd156a4646ef09ed7cffa24a482e002d4ddfff3 /tests/t_codingstandard.sh
parentec37e36a622614ac233d986911889bac1e59fc46 (diff)
downloadmcserver-wrapper-a149a27041e90674f34228e7ef1b05b6f1a61ca5.tar.gz
mcserver-wrapper-a149a27041e90674f34228e7ef1b05b6f1a61ca5.tar.bz2
mcserver-wrapper-a149a27041e90674f34228e7ef1b05b6f1a61ca5.zip
Add Travis test
For beginning only coding standards are check. In future should be tested at least basic features.
Diffstat (limited to 'tests/t_codingstandard.sh')
-rwxr-xr-xtests/t_codingstandard.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/t_codingstandard.sh b/tests/t_codingstandard.sh
new file mode 100755
index 0000000..4daba17
--- /dev/null
+++ b/tests/t_codingstandard.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+cd "$( dirname "${BASH_SOURCE[0]}" )"
+source prepare.sh
+
+echo "Checking code style using pep8"
+pep8 ../mcwrapper
+if [[ $? == 0 ]]; then
+ echo "Ok"
+else
+ exit 1
+fi
+
+echo "Checking for common errors"
+pyflakes ../mcwrapper
+if [[ $? == 0 ]]; then
+ echo "Ok"
+else
+ exit 1
+fi
+
+# This test is not part of standard check because of errors caused by dynamic variable
+# loading to configuration. But it should be run from time to time to found other mistakes
+#echo "Checking bugs and poor quality"
+#pylint --msg-template="{line}: [{msg_id}({symbol}), {obj}] {msg}" --reports=n ../mcwrapper