ci: Add gitlint and document commit conventions

* Add gitlint to pre-commit setup
* Update pre-commit setup for installing commit-hooks
* Add "Commit Conventions" contributing docs

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
This commit is contained in:
Peter Johanson
2024-11-08 12:53:33 -07:00
committed by Pete Johanson
parent b0f5789b12
commit 14c6fb74ee
5 changed files with 218 additions and 2 deletions
@@ -22,12 +22,14 @@ Now that pre-commit is installed on your PC, you need to install it into the ZMK
```bash
pre-commit install
pre-commit install --hook-type commit-msg
```
This should print a message such as
```
pre-commit installed at .git\hooks\pre-commit
pre-commit installed at .git/hooks/pre-commit
pre-commit installed at .git/hooks/commit-msg
```
Pre-commit will now automatically check your changes whenever you run `git commit`. If it detects a problem, it will describe the problem and cancel the commit. For simple problems such as incorrect formatting, it will also automatically fix the files so you can just `git add` them and try again.