Description
I tried YETUS-211.1.patch and got the following error:
[sekikn@localhost yetus]$ precommit/test-patch.sh --build-tool=nobuild --plugins=all --resetrepo YETUS-211 (snip) ============================================================================ ============================================================================ pylint plugin: prepatch ============================================================================ ============================================================================ Running pylint against modified python scripts. grep: /tmp/yetus-6656.30892/pylint.20253.7393: No such file or directory grep: /tmp/yetus-6656.30892/pylint.20253.7393: No such file or directory grep: /tmp/yetus-6656.30892/pylint.20253.7393: No such file or directory (snip) ============================================================================ ============================================================================ pylint plugin: postpatch ============================================================================ ============================================================================ Running pylint against modified python scripts. grep: /tmp/yetus-6656.30892/pylint.20253.31981: No such file or directory grep: /tmp/yetus-6656.30892/pylint.20253.31981: No such file or directory grep: /tmp/yetus-6656.30892/pylint.20253.31981: No such file or directory
This is because stderr redirected file is always checked even if it doesn't exist. Lines 135-141 should be inside of lines 130-134.
pylint.sh
129 for i in ${CHANGED_FILES}; do 130 if [[ ${i} =~ \.py$ && -f ${i} ]]; then 131 # shellcheck disable=SC2086 132 eval "${PYLINT} ${PYLINT_OPTIONS} --msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}' --reports=n ${i}" \ 133 2>${PATCH_DIR}/${tmp} | ${AWK} '1<NR' >> "${PATCH_DIR}/patch-pylint-result.txt" 134 fi 135 # shellcheck disable=SC2016 136 count=$(${GREP} -v "^No config file found" "${PATCH_DIR}/${tmp}" | wc -l | ${AWK} '{print $1}') 137 if [[ ${count} -gt 0 ]]; then 138 add_vote_table -1 pylint "Something bad seems to have happened in running pylint. Please check pylint stderr files." 139 add_footer_table pylint "postpatch stderr: @@BASE@@/${tmp}" 140 return 1 141 fi 142 done