scripts: checkpatch: Add Chinese language check for EN doc

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I4afffa829e627bdb5647727561b7ffabbb098eb7
This commit is contained in:
Joseph Chen
2023-04-14 07:21:40 +00:00
parent e735b80b6f
commit 0095192962

View File

@@ -106,6 +106,12 @@ function check_doc()
grep '^[0-9]\. [A-Z]' ${DOC} | grep '[^.]$'
exit 1
fi
# check Chinese language
if grep -P '[\x{4e00}-\x{9fa5}]' ${DOC} ; then
echo "ERROR: ${DOC}: The Chinese language was found"
exit 1
fi
else
# check end with '。'
if sed -n '/^[0-9]\. /p' ${DOC} | grep -q '[^。]$' ; then