summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-19 02:03:39 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-19 02:03:39 +0200
commitdf2cbb6353be8d06f11bd622e3961d05ad046149 (patch)
treed4484f0b3d08c66e08ce91e871a4ab6b69bfe64c
parent[Lib] Updated jinja2 to v2.7.3 and markupsafe to v0.23 (diff)
downloadpyload-df2cbb6353be8d06f11bd622e3961d05ad046149.tar.xz
Two devtool scripts from master branch
-rw-r--r--scripts/clonedigger.sh4
-rw-r--r--scripts/code_analysis.sh25
2 files changed, 29 insertions, 0 deletions
diff --git a/scripts/clonedigger.sh b/scripts/clonedigger.sh
new file mode 100644
index 000000000..87c3437cf
--- /dev/null
+++ b/scripts/clonedigger.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+PYLOAD="../module" # Check ~/pyload/module directory
+clonedigger -o cpd.xml --cpd-output --fast --ignore-dir="lib" --ignore-dir="remote" $PYLOAD
diff --git a/scripts/code_analysis.sh b/scripts/code_analysis.sh
new file mode 100644
index 000000000..dce93d63d
--- /dev/null
+++ b/scripts/code_analysis.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+PYLOAD="../module" # Check ~/pyload/module directory
+
+echo "Running sloccount ..."
+REPORT="sloccount.sc"
+sloccount --duplicates --wide --details $PYLOAD > $REPORT && echo "Done. Report saved to $REPORT"
+
+echo "Running pep8 ..."
+REPORT="pep8.txt"
+pep8 $PYLOAD > $REPORT && echo "Done. Report saved to $REPORT"
+
+echo "Running pylint ..."
+REPORT="pylint.txt"
+pylint --reports=no $PYLOAD > $REPORT && echo "Done. Report saved to $REPORT"
+
+#echo "Running pyflakes ..."
+#REPORT="pyflakes.txt"
+#{
+ # pyflakes to pylint syntak
+# find $PYLOAD -type f -name "*.py" | egrep -v '^\./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" > $REPORT
+# sed -i 's/^.\///g' $REPORT
+#} && echo "Done. Report saved to $REPORT"