forked from pyload/pyload
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode_analysis.sh
More file actions
25 lines (20 loc) · 888 Bytes
/
code_analysis.sh
File metadata and controls
25 lines (20 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"