Skip to content

Commit 18d8fea

Browse files
committed
ci: fix double-newline issue in spellcheck.dic
Remove only the first line only. Eliminate the empty line at the end of spellcheck.dic. Remove the check that enforces a trailing empty line.
1 parent 74a4e57 commit 18d8fea

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

.github/workflows/ci.yml

+7-15
Original file line numberDiff line numberDiff line change
@@ -1095,23 +1095,15 @@ jobs:
10951095
fi
10961096
expected_count="$first_line"
10971097
1098-
# Verify the last line is completely empty (no spaces).
1099-
last_line=$(tail -n 1 "$FILE")
1100-
if [ -n "$last_line" ]; then
1101-
echo "Error: The last line of $FILE must be empty (without spaces)."
1102-
exit 1
1103-
fi
1104-
1105-
# Check that the number of lines between the first and last matches the integer.
1106-
# xargs (with no arguments) will strip leading/trailing whitespace from wc's output.
1107-
actual_count=$(sed '1d;$d' "$FILE" | wc -l | xargs)
1098+
# Check that the number of lines matches the integer.
1099+
# xargs (with no arguments) will strip leading/trailing whitespacefrom wc's output.
1100+
actual_count=$(sed '1d' "$FILE" | wc -l | xargs)
11081101
if [ "$expected_count" -ne "$actual_count" ]; then
1109-
echo "Error: The number of lines between the first and last ($actual_count) does not match $expected_count."
1102+
echo "Error: The number of lines ($actual_count) does not match $expected_count."
11101103
exit 1
11111104
fi
11121105
1113-
# `sed` removes the first line (number of words) and
1114-
# the last line (new line).
1106+
# `sed` removes the first line (number of words).
11151107
#
11161108
# `sort` makes sure everything in between is sorted
11171109
# and contains no duplicates.
@@ -1121,10 +1113,10 @@ jobs:
11211113
# environments.
11221114
11231115
(
1124-
sed '1d; $d' $FILE | LC_ALL=en_US.UTF8 sort -uc
1116+
sed '1d' $FILE | LC_ALL=en_US.UTF8 sort -uc
11251117
) || {
11261118
echo "Dictionary is not in sorted order. Correct order is:"
1127-
LC_ALL=en_US.UTF8 sort -u <(sed '1d; $d' $FILE)
1119+
LC_ALL=en_US.UTF8 sort -u <(sed '1d' $FILE)
11281120
false
11291121
}
11301122
- name: Run cargo-spellcheck

spellcheck.dic

-1
Original file line numberDiff line numberDiff line change
@@ -298,4 +298,3 @@ Wakers
298298
wakeup
299299
wakeups
300300
workstealing
301-

0 commit comments

Comments
 (0)