Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pre-commit hook config #19

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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