aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Trautman <ctrautma@redhat.com>2017-05-01 11:13:59 -0400
committerChristian Trautman <ctrautma@redhat.com>2017-05-02 08:20:10 -0400
commit59aae8c0539ca9632d9ffdcb2788ab715fbff9ec (patch)
tree28f35d3e055c94e02d60313d59f3807df3c2d9c4
parentced349e749efcd129943544812bc607238879383 (diff)
pylint_error_report: Report errors generated from pylint failures
Change the output of the pylint check script to report the errors generated from a non 10 pylint score. JIRA: VSPerf-508 Change-Id: I6d764f4040a662385c83125322bec7e887942bc5 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
-rwxr-xr-xcheck4
1 files changed, 3 insertions, 1 deletions
diff --git a/check b/check
index 1d67e293..3c8c2927 100755
--- a/check
+++ b/check
@@ -158,7 +158,8 @@ if [ -s $FILE_LIST ] ; then
continue
fi
# run pylint and extract final rating
- rating=`$PYLINT --rcfile $PYLINT_RC $pyfile 2>/dev/null | tail -n3 | grep rated | sed -e 's/^.*rated at \([0-9.]*\).*$/\1/'`
+ output=`$PYLINT --rcfile $PYLINT_RC $pyfile 2>/dev/null`
+ rating=`echo -e $output | tail -n3 | grep rated | sed -e 's/^.*rated at \([0-9.]*\).*$/\1/'`
# evaluate and display aquired rating
if [ "x$rating" == "x" ] ; then
# rating is not available for files without python statements
@@ -166,6 +167,7 @@ if [ -s $FILE_LIST ] ; then
elif rating_is_ok $rating ; then
printf " %-70s ${GREEN}%-6s${BLACK}\n" $pyfile "OK"
else
+ echo -e "$output" | awk '/^*+ Module|^[A-Z]\:/'
printf " %-70s ${RED}%-6s${BLACK}\n" $pyfile $rating
fi
done