Skip to content

Commit 5eb2ab3

Browse files
author
Guillaume Loubier
committed
Update README with configuration options
1 parent 1e7425b commit 5eb2ab3

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# guard::codespell
22

3-
**guard-codespell** helps keeping your code typo free by running [codespell](https://github.com/codespell-project/codespell) when files are modified
3+
**guard-codespell** helps in keeping your code typo free by running [codespell](https://github.com/codespell-project/codespell) when files are modified
44

55
## Installation
66

@@ -23,6 +23,24 @@ $ bundle install
2323

2424
See guard documentation for how to [add a guard plugin](https://github.com/guard/guard#add-guard-plugins) and [how to use guard](https://github.com/guard/guard#usage).
2525

26+
## Configuration
27+
28+
Some configuration options are available to use with guard-codespell.
29+
30+
| Option | Type | Description |
31+
| ----- | ----- | ----- |
32+
| `all_on_start` | Boolean | Run codespell when starting guard |
33+
| `config` | String | Path to a [codespell config file](https://github.com/codespell-project/codespell#using-a-config-file) |
34+
| `debug` | Boolean | Show the codespell command that is used when guard-codespell runs |
35+
| `only_git_changes` | Boolean | Only run codespell on files tracked by git (the result of `git status --porcelain` is used to create the list of files to check for errors. |
36+
37+
Here's an example on how to use those options in your Guardfile
38+
39+
```ruby
40+
guard :codespell, config: ".codespellrc", debug: true, only_git_changes: true do
41+
end
42+
```
43+
2644
## Contributing
2745

2846
Bug reports and pull requests are welcome on GitHub at https://github.com/hooktstudios/guard-codespell. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/hooktstudios/guard-codespell/blob/master/CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)