Use pipe pylint result to sort -u for error deduplication (#9893)

Due to an pylint issue https://github.com/PyCQA/pylint/issues/3584
single error/warning is printed multiple times when using
pylint in multiprocessing mode
This commit is contained in:
Tomek Urbaszek 2020-07-21 18:46:36 +02:00 коммит произвёл GitHub
Родитель bff713750f
Коммит b823f8a2e8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -29,11 +29,11 @@ if [[ ${#@} == "0" ]]; then
find "./tests" "./kubernetes_tests" -name "*.py" | \ find "./tests" "./kubernetes_tests" -name "*.py" | \
grep -vFf scripts/ci/pylint_todo.txt | \ grep -vFf scripts/ci/pylint_todo.txt | \
# running pylint using built-in parallel functionality might speed it up # running pylint using built-in parallel functionality might speed it up
xargs pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized xargs pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized | sort -u
RES=$? RES=$?
else else
# running pylint using built-in parallel functionality might speed it up # running pylint using built-in parallel functionality might speed it up
pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized "$@" pylint -j 0 --disable="${DISABLE_CHECKS_FOR_TESTS}" --output-format=colorized "$@" | sort -u
RES=$? RES=$?
fi fi