From 569d96af625ad4837b06cf2beb5720f1e0fea2a2 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 29 Jun 2013 20:39:28 +0200 Subject: added pep8 configsection --- tests/code_analysis.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 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 100755 index 000000000..d8ede8d4b --- /dev/null +++ b/tests/code_analysis.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +sloccount --duplicates --wide --details pyload > sloccount.sc + +echo "Running pep8" + +pep8 pyload > pep8.txt + +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 -- cgit v1.2.3