ci: improve check pylint get files command

This commit is contained in:
Fu Hanxi 2023-10-19 11:53:18 +02:00
parent 6a34106488
commit 651f60e663
No known key found for this signature in database
GPG Key ID: 19399699CF3C4B16

View File

@ -32,7 +32,7 @@ check_pylint:
if [ -n "$CI_MERGE_REQUEST_IID" ]; then
export files=$(echo "$GIT_DIFF_OUTPUT" | grep ".py$" | xargs);
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