From 91115fd577f20704ef7f2e74c4527ffbb0730a09 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Sep 2014 01:08:03 +0200 Subject: Restructure pyload file tree (1) --- tests/code_analysis.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/code_analysis.sh (limited to 'tests/code_analysis.sh') diff --git a/tests/code_analysis.sh b/tests/code_analysis.sh new file mode 100644 index 000000000..c853652bf --- /dev/null +++ b/tests/code_analysis.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +PYLOAD="../pyload" # Check pyload 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" -- cgit v1.2.3