Improve pylint.sh to be much less noisy and annoying

This commit is contained in:
Chris Jones 2009-12-09 13:32:35 +00:00
parent c31758179e
commit 0d319e8a57
1 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,11 @@
#!/bin/bash
for file in *.py; do
echo -n "$file: "
pylint $file 2>&1 | grep "^Your code has been rated"
line=$(pylint $file 2>&1 | grep "^Your code has been rated")
rating=$(echo $line | cut -f 7 -d ' ')
previous=$(echo $line | cut -f 10 -d ' ')
if [ "$rating" != "10.00/10" ]; then
echo "$file rated $rating (previously $previous)"
fi
done