From 9d14ed6c1429575c9ce8e5e256e4b50b28685c9b Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Fri, 26 Aug 2022 17:22:52 -0700 Subject: [PATCH] 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. --- Meta/check-emoji.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Meta/check-emoji.sh b/Meta/check-emoji.sh index 9d1c5766fe..5d71c501c4 100755 --- a/Meta/check-emoji.sh +++ b/Meta/check-emoji.sh @@ -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