Skip to content

Commit

Permalink
feat: add pre-commit hook config (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Ville Skyttä <[email protected]>
  • Loading branch information
VannTen and scop authored Jun 7, 2024
1 parent 475533d commit 528d713
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- id: misspell
name: misspell
description: Correct commonly misspelled English words... quickly
language: golang
entry: misspell
args:
- -w
- -error
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,23 @@ Usage of misspell:
-w Overwrite file with corrections (default is just to display)
```

### Pre-commit hook

To use misspell with [pre-commit](https://pre-commit.com/), add the following to your `.pre-commit-config.yaml`:


```yaml
- repo: https://github.com/golangci/misspell
rev: v0.6.0
hooks:
- id: misspell
# The hook will run on all files by default.
# To limit to some files only, use pre-commit patterns/types
# files: <pattern>
# exclude: <pattern>
# types: <types>
```

## FAQ

* [Automatic Corrections](#correct)
Expand Down

0 comments on commit 528d713

Please sign in to comment.