build(docs): auto alphabetize .spelling
file
#12521
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12360 (comment)
Related to #11814 (comment)
Motivation
We've had a few different attempts to alphabetize this at different times, but manual efforts mean that things can get undone unfortunately easily. So I wrote a tiny script to automate alphabetizing it
Modifications
run a tiny shell script as part of
make docs-spellcheck
to alphabetize the fileclarify / shorten comments in the
.spelling
file (was previously verbatim copy+pasted from its README)slightly rewrite comments / naming in Docs GHA Workflow step to account for this additional "linter"
Verification
Makefile
, where the$(shell ...)
was necessarydevcontainer
and native on macOS{ head -n 5; sort; }
or{ sed -u 5q; sort; }
did not seem to work on my Mac, so I went with theawk
variantcat <(head -n 5 .spelling) <(tail -n +6 .spelling | sort | uniq)
| tee
in there as just redirecting the output with> .spelling
would cause an empty file