Skip to content

Commit 6cf10a4

Browse files
committed
Add pre-commit check for the order of aspell dict
Suggested-by: Jim Huang <jserv@ccns.ncku.edu.tw> Change-Id: Iff9a9eaed081f340ecbec758e741a3fb66863753
1 parent 03efe64 commit 6cf10a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: scripts/pre-commit.hook

+5
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ if [ "${#SHELL_FILES[@]}" -gt 0 ]; then
222222
done
223223
fi
224224

225+
ASPELL_DICT_FILE='scripts/aspell-pws'
226+
if ! tail -n +2 $ASPELL_DICT_FILE | sort -cdu; then
227+
throw 'Aspell dictionary is unsorted or contains duplicated entries.'
228+
fi
229+
225230
# Show insertion and deletion counts.
226231
if [ "${#FILES[@]}" -gt 0 ]; then
227232
echo "Following files were changed:"

0 commit comments

Comments
 (0)