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

Adding configuration for pre-commit #190

Merged
merged 7 commits into from
Mar 20, 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
10 changes: 10 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- id: 'pyspelling'
name: 'pyspelling'
description: 'This hook runs pyspelling'
language: 'python'
entry: 'pyspelling'
pass_filenames: false
additional_dependencies:
- 'pymdown-extensions'
...
20 changes: 20 additions & 0 deletions docs/src/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,23 @@ jobs:

In *this* project, we actually use `tox` to make running our tests locally and in CI easier. If you would like to use
`tox` as well, you can check out how this project does it by taking a look at the source.

## Usage as `pre-commit` Hook

PySpelling can be used as a [`pre-commit`](https://pre-commit.com/) hook. To use it as a `pre-commit` hook, please have a
look at the following example `.pre-commit-config.yaml`:

```yaml
---
repos:
- repo: 'https://github.com/facelessuser/pyspelling.git'
rev: 'v2.11'
hooks:
- id: 'pyspelling'
verbose: true
pass_filenames: false
...
sscheib marked this conversation as resolved.
Show resolved Hide resolved
```

Please note that version tags should be preferred over using the `master` branch as revision (`rev`) attribute, as the
`master` branch is considered unstable.
Loading