From 0d319e8a578f5f211391344a662c79b081817bef Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 9 Dec 2009 13:32:35 +0000 Subject: [PATCH] Improve pylint.sh to be much less noisy and annoying --- terminatorlib/pylint.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/terminatorlib/pylint.sh b/terminatorlib/pylint.sh index 4e126560..208bdb7a 100755 --- a/terminatorlib/pylint.sh +++ b/terminatorlib/pylint.sh @@ -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