tools/checkpatch.sh: Improved error display on GitHub
Some checks failed
Build Documentation / build-html (push) Has been cancelled

The improvement includes symbols that help employees visualise any errors detected during the PR check phase (check.yml).

Error ->  U+274C  Cross Mark
             https://en.wikipedia.org/wiki/X_mark

Checks pass -> ✔️ U+2714 Heavy Check Mark
             https://en.wikipedia.org/wiki/Check_mark

These characters are emojis that are recognized by the Unicode standards which define what each character represents.

Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
simbit18
2025-11-14 14:52:31 +01:00
committed by Alan C. Assis
parent 858619ec29
commit 6161fececf

View File

@@ -297,17 +297,17 @@ check_msg() {
while IFS= read -r REPLY; do
if [[ $REPLY =~ ^Change-Id ]]; then
echo "Remove Gerrit Change-ID's before submitting upstream"
echo "Remove Gerrit Change-ID's before submitting upstream"
fail=1
fi
if [[ $REPLY =~ ^VELAPLATO ]]; then
echo "Remove VELAPLATO before submitting upstream"
echo "Remove VELAPLATO before submitting upstream"
fail=1
fi
if [[ $REPLY =~ ^[Ww][Ii][Pp]: ]]; then
echo "Remove WIP before submitting upstream"
echo "Remove WIP before submitting upstream"
fail=1
fi
@@ -319,22 +319,22 @@ check_msg() {
done <<< "$msg"
if ! [[ $first =~ : ]]; then
echo "Commit subject missing colon (e.g. 'subsystem: msg')"
echo "Commit subject missing colon (e.g. 'subsystem: msg')"
fail=1
fi
if (( ${#first} > $max_line_len )); then
echo "Commit subject too long > $max_line_len"
echo "Commit subject too long > $max_line_len"
fail=1
fi
if ! [ $signedoffby_found == 1 ]; then
echo "Missing Signed-off-by"
echo "Missing Signed-off-by"
fail=1
fi
if (( $num_lines < $min_num_lines && $signedoffby_found == 1 )); then
echo "Missing git commit message"
echo "Missing git commit message"
fail=1
fi
}
@@ -409,12 +409,11 @@ for arg in $@; do
$check $arg
done
if [ $fail == 1 ]; then
echo "Some checks failed. For contributing guidelines, see:"
echo " $COMMIT_URL"
else
echo "All checks pass."
echo "✔️ All checks pass."
fi
exit $fail