Meta: Enforce no leading zeros for emoji filenames

The current lookup code and emoji.txt generator expects codepoints to
not include leading zeros. This may change in the future, but it's worth
enforcing the current convention until then.
This commit is contained in:
Ryan Liptak 2022-08-26 17:22:52 -07:00 committed by Linus Groh
parent 5297c22eaa
commit 9d14ed6c14
Notes: sideshowbarker 2024-07-17 07:39:59 +09:00

View File

@ -17,6 +17,10 @@ for fn in "${files[@]}"; do
echo "$fn contains invalid characters in its filename. Only uppercase letters, numbers, +, and _ should be used."
found_invalid_filenames=1
fi
if [[ $basename == *U+0* ]] ; then
echo "$fn contains codepoint(s) with leading zeros. Leading zeros should be removed from codepoint(s)."
found_invalid_filenames=1
fi
if [[ $basename == *+U* ]] ; then
echo "$fn is incorrectly named. _ should be used as a separator between codepoints, not +."
found_invalid_filenames=1