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.
This is a close copy of JuliaLang/julia#51704
The design now is...
Look at each file that was edited and neither created nor deleted. Scan these all for typos longer than 3 characters using the rust typos crate and compute the union. This is our baseline of "false positives". Compile this list into a Python set.
Look at each file that was edited and not deleted. Scan these all for typos longer than 3 characters using the rust typos crate, skipping any typos that are in the set of false positives. For each remaining typo, provide a github annotation and, if the typo is longer than 5 characters (at least 88% true positivity rate for typos that long), mark the CI job as a failure but continue to report all remaining novel typos.
This achieves:
typos
crateRuntime on is 14s total, 5s doing the actual checks,
typos
goes through only the files that have been changed (and goes through them twice) bash handles lists of length equal to the number of files edited, python runs in O(number of reported typos). Runtime here should be negligibly shorter. 4 minute timeout.See JuliaLang/julia#51704 (comment) for false positivity stats
I've used lower (by one character) thresholds here than on JuliaLang/julia because
Because this only checks for new typos, there is no need to wait for #1983 to merge before merging this.