ci: make sure dictionary words are sorted and unique (#6316)

This commit is contained in:
M.Amin Rayej
2024-01-31 16:11:54 +03:30
committed by GitHub
parent 9077762545
commit 53f9e5a357
2 changed files with 34 additions and 21 deletions
+13
View File
@@ -1011,6 +1011,19 @@ jobs:
with:
tool: cargo-spellcheck
- uses: actions/checkout@v4
- name: Make sure dictionary words are sorted and unique
run: |
# `sed` removes the first line (number of words) and
# the last line (new line).
#
# `sort` makes sure everything in between is sorted
# and contains no duplicates.
#
# Since `sort` is sensitive to locale, we set it
# using LC_ALL to en_US.UTF8 to be consistent in different
# environments.
sed '1d; $d' spellcheck.dic | LC_ALL=en_US.UTF8 sort -uc
- name: Run cargo-spellcheck
run: cargo spellcheck --code 1