Skip to content

Commit b72e1d4

Browse files
committed
checkpatch: only print output for issues
No need to print code blocks if there are no issues, save space for important info. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent ebef5cc commit b72e1d4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

entrypoint.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,15 @@ _checkpatch() {
646646
-g HEAD 2>&1 | tee "${TMPFILE}" >&2
647647

648648
{
649-
echo "- Commit $(get_commit_md):"
650-
echo "\`\`\`"
651-
cat "${TMPFILE}"
652-
echo "\`\`\`"
649+
echo -n "- Commit $(get_commit_md):"
650+
if ! grep -q "^total: 0 errors, 0 warnings, 0 checks" "${TMPFILE}"; then
651+
echo
652+
echo "\`\`\`"
653+
cat "${TMPFILE}"
654+
echo "\`\`\`"
655+
else
656+
echo " no checkpatch issue"
657+
fi
653658
} >> "${CHECKPATCH_DETAILS}"
654659

655660
grep "^total:" "${TMPFILE}" | tail -n1

0 commit comments

Comments
 (0)