-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- id: typos | ||
name: typos | ||
description: Source code spell checker | ||
language: rust | ||
entry: typos | ||
args: [--write-changes] | ||
types: [text] |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# pre-commit | ||
|
||
To use `typos` with [`pre-commit`](https://pre-commit.com), point its | ||
config at this repository: | ||
|
||
```yaml | ||
repos: | ||
- repo: https://github.com/crate-ci/typos | ||
rev: v1.0.6 | ||
hooks: | ||
- id: typos | ||
``` | ||
|
||
Be sure to change `rev` to use the desired `typos` git tag or | ||
revision. | ||
|
||
The hook configuration defaults to writing fixes, which triggers a | ||
`pre-commit` failure if any files are modified. To make it report its | ||
findings only instead, override the hook's `args` with something that | ||
does not contain `-w`/`--write-changes`, for example `[]` (meaning | ||
pass no options). |