浏览代码

HUE-9371 [pylint] Get linting return code result just after the linting

Romain 5 年之前
父节点
当前提交
19831a70b5
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      tools/ci/check_for_python_lint.sh

+ 4 - 2
tools/ci/check_for_python_lint.sh

@@ -27,11 +27,13 @@ cd $HOME
 if [ ! -z "$files" ];
 then
   ./build/env/bin/hue runpylint --files "$files"
+  FOUND_ISSUE=$?
+else
+  echo "No Python code files changed present"
 fi
 
-if [ -z "$files" ] || [ "$?" -eq "0" ]
+if [ "$FOUND_ISSUE" -eq "0" ]
 then
-  FOUND_ISSUE=0
   echo "No Python code styling issues found"
 else
   echo "Found some Python code styling issues"