Skip to content

Commit 64b9f90

Browse files
authored
Merge pull request #276 from sysprog21/refine-dict-check
Enforce consistent dictionary sorting
2 parents 2b54e1e + 08a36cd commit 64b9f90

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

scripts/aspell-pws

-15
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ kexec
168168
lchown
169169
ld
170170
leetcode
171-
LeetCode
172171
lf
173172
lhs
174173
lib
@@ -181,12 +180,10 @@ lld
181180
lldb
182181
llu
183182
llx
184-
llX
185183
longjmp
186184
lseek
187185
lu
188186
lx
189-
lX
190187
macOS
191188
madvise
192189
malloc
@@ -230,7 +227,6 @@ pEo
230227
perf
231228
pEs
232229
pf
233-
pF
234230
pg
235231
pGg
236232
pGp
@@ -239,25 +235,16 @@ phC
239235
phD
240236
phN
241237
piSb
242-
pISb
243238
piSc
244-
pISc
245239
piSf
246-
pISf
247240
piSh
248-
pISh
249241
piSl
250-
pISl
251242
piSn
252-
pISn
253243
piSpc
254-
pISpc
255244
pK
256245
pm
257-
pM
258246
pMF
259247
pmR
260-
pMR
261248
pNF
262249
posix
263250
pr
@@ -270,11 +257,9 @@ preprocessor
270257
printf
271258
proc
272259
ps
273-
pS
274260
pSR
275261
ptrace
276262
pUl
277-
pUL
278263
putc
279264
putchar
280265
putenv

scripts/pre-commit.hook

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ if [ "${#SHELL_FILES[@]}" -gt 0 ]; then
223223
fi
224224

225225
ASPELL_DICT_FILE='scripts/aspell-pws'
226-
if ! tail -n +2 $ASPELL_DICT_FILE | sort -cdu; then
226+
if ! LC_ALL=C tail -n +2 $ASPELL_DICT_FILE | sort -f -cdu; then
227227
throw '%s\n%s\n%s' \
228228
'Aspell dictionary is unsorted or contains duplicated entries.' \
229229
'Make sure that by using:' \
230-
" tail -n +2 $ASPELL_DICT_FILE | sort -du"
230+
" tail -n +2 $ASPELL_DICT_FILE | sort -f -du"
231231
fi
232232

233233
# Show insertion and deletion counts.

0 commit comments

Comments
 (0)