Skip to content

Commit

Permalink
chore: add commit-msg git-hook
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Jun 26, 2023
1 parent a137fcc commit 64ddcf6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ post_bump_hooks = [
"echo 'we are done'"
]

[git_hooks.commit-msg]
script = """#!/bin/sh
set -e
echo "[Check current commit message]"
cog verify --file $1
echo "[Conventional commit check]"
cog check
echo "[Format code]"
cargo fmt -v --all --check
echo "[Lints]"
cargo clippy
"""

# An optional list of additional allowed commit type
# `cog commit {commit_type}` commit command will be generated at runtime
[commit_types]
Expand Down

0 comments on commit 64ddcf6

Please sign in to comment.