Skip to content

Commit

Permalink
✨ feat: add pre-commit hook config
Browse files Browse the repository at this point in the history
  • Loading branch information
TribuneX committed Jan 17, 2025
1 parent 5d00fa7 commit f00d8a3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- id: git-sumi
name: Lint commit message with git sumi
description: Lints each new commit with git sumi based on the configured project rules in your sumi.toml
entry: git-sumi --file
language: rust
stages: [prepare-commit-msg]
12 changes: 12 additions & 0 deletions website/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ git sumi -c '🎨 refactor: format JS with Prettier'

If your message passes all rules, it will be committed. Otherwise, you'll see what went wrong.

### Using pre-commit

You can also integrate git-**sumi** via [pre-commit](https://pre-commit.com/#intro) by adding the following hook to your pre-commit config:

```yaml
repos:
- repo: https://github.com/welpo/git-sumi
rev: v0.1.0 # check latest version: https://github.com/welpo/git-sumi/tags
hooks:
- id: git-sumi
```
## Contributing
Please do! We appreciate bug reports, improvements to documentation (however minor), feature requests, code contributions… To get started, take a look at the [contributing guidelines](https://github.com/welpo/git-sumi/blob/main/CONTRIBUTING.md).

0 comments on commit f00d8a3

Please sign in to comment.