summaryrefslogtreecommitdiffstats
path: root/tests/code_analysis.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/code_analysis.sh')
-rwxr-xr-xtests/code_analysis.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/code_analysis.sh b/tests/code_analysis.sh
new file mode 100755
index 000000000..e027bac2f
--- /dev/null
+++ b/tests/code_analysis.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+sloccount --duplicates --wide --details pyload > sloccount.sc
+
+echo "Running pep8"
+pep8 pyload > pep8.txt
+
+echo "Running pylint"
+pylint --reports=no pyload > pylint.txt || exit 0
+
+#echo "Running pyflakes"
+# pyflakes to pylint syntak
+#find -name '*.py' |egrep -v '^.(/tests/|/pyload/lib)'|xargs pyflakes > pyflakes.log || :
+# Filter warnings and strip ./ from path
+#cat pyflakes.log | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' | grep -i -E -v "'_'|pypath|webinterface|pyreq|addonmanager" > pyflakes.txt
+#sed -i 's/^.\///g' pyflakes.txt \ No newline at end of file