Add Workflow For Fixing Typos And Fix Existing Typos#707
Open
O957 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR:
crime-data-api.fix-typos.yamlto./.github/workflowsthat runs in pulls requests and checks for common spelling mistakes.pre-commithook fortyposin the.pre-commit-config.yamlfile, along with a workflow file forpre-committo run in PRs1._typos.yaml), which can be used for false positives, for thetyposworkflow.Context: Most individuals would prefer their repositories to be free of mispellings. One tool that I found works well for this is
crate-ci's repositorytypos(written in Rust), which can be employed either as apre-commithook, which shows the mispellings before commits are pushed, or as a GitHub workflow, which displays the found mispellings in a PR. Sometimes there are false positives; these are classified in the_typos.tomlconfiguration file under "[default.extend-words]". I've added thepre-commithook version (along with the workflow file forpre-committo run in PRs) and workflow version (seefix-typos.yamlin.github/workflows) oftypos(which would not requirepre-commit) for you to select between; I have also added the configuration file_typos.toml. There were several false positives which I excluded via the configuration file. My personal preference would be to use thepre-commitversion, but I understand if you want this repository to be free ofpre-commit, so I've added the workflowfix-typos.yaml.Example Error Found Using Typos In Pre-Commit (Locally)
Full Errors Found After Removing False Positives In Pre-Commit
Example Typos Configuration File
Note
Thank you for making and maintaining this repository!
Footnotes
Remember to run
pre-commit installbefore doingpre-commit run --all-filesfor testing. ↩