Ver código fonte

ci: improve check pylint get files command

Fu Hanxi 2 anos atrás
pai
commit
ba3d23342d
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      .gitlab/ci/static-code-analysis.yml

+ 1 - 1
.gitlab/ci/static-code-analysis.yml

@@ -30,7 +30,7 @@ check_pylint:
       if [ -n "$CI_MERGE_REQUEST_IID" ]; then
         export files=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py files ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} | grep ".py$");
       else
-        export files=$(find . -iname "*.py" -print);
+        export files=$(git ls-files "*.py" | xargs);
       fi
     - if [ -z "$files" ]; then echo "No python files found"; exit 0; fi
     - run_cmd pylint --exit-zero --load-plugins=pylint_gitlab --output-format=gitlab-codeclimate:pylint.json $files