Skip to content

Commit 528d713

Browse files
VannTenscop
andauthored
feat: add pre-commit hook config (#19)
Co-authored-by: Ville Skyttä <[email protected]>
1 parent 475533d commit 528d713

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.pre-commit-hooks.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- id: misspell
2+
name: misspell
3+
description: Correct commonly misspelled English words... quickly
4+
language: golang
5+
entry: misspell
6+
args:
7+
- -w
8+
- -error

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ Usage of misspell:
6767
-w Overwrite file with corrections (default is just to display)
6868
```
6969

70+
### Pre-commit hook
71+
72+
To use misspell with [pre-commit](https://pre-commit.com/), add the following to your `.pre-commit-config.yaml`:
73+
74+
75+
```yaml
76+
- repo: https://github.com/golangci/misspell
77+
rev: v0.6.0
78+
hooks:
79+
- id: misspell
80+
# The hook will run on all files by default.
81+
# To limit to some files only, use pre-commit patterns/types
82+
# files: <pattern>
83+
# exclude: <pattern>
84+
# types: <types>
85+
```
86+
7087
## FAQ
7188

7289
* [Automatic Corrections](#correct)

0 commit comments

Comments
 (0)