Enforce style guidelines with custom codespell dictionary #10221
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.
Adds a custom dictionary to codespell. Both the default codespell dictionary and our custom dictionary are checked, using multiple copies of the
-D
argument.Currently, this dictionary only contains "anti-aliasing -> antialiasing". Later, we can add other style guidelines that we want to enforce, like perhaps "run-time -> runtime". #10218 tracks potential words to add.
Note that codespell is limited here. We can't check for phrases with spaces or for specific capitalizations. We also can't check for phrases which we don't want to enforce a style for 99%+ of the time, since each exception needs to be listed in an ignore file. So the number of entries in the custom dictionary will likely remain low.
Addresses #10218, but does not close.
This PR is a pure superset of #10220. It uses the same fix for codespell not checking some files. It also includes the one typo found by the other PR, so that the CI passes. However, I made two separate PRs because we probably want to merge the simple bug fix before this feature change.