2025-11-06 22:31:29 +00:00
|
|
|
pre-commit:
|
|
|
|
|
commands:
|
2026-01-23 20:37:55 +00:00
|
|
|
check-ssh-identity:
|
|
|
|
|
run: |
|
|
|
|
|
# Check if any SSH identities are available
|
|
|
|
|
if ! ssh-add -l &>/dev/null || [ "$(ssh-add -l 2>/dev/null | grep -v 'The agent has no identities.')" = "" ]; then
|
|
|
|
|
echo "Error: No SSH identities found in your SSH agent."
|
|
|
|
|
echo "Please run 'ssh-add' to add your SSH key before committing."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2025-11-06 22:31:29 +00:00
|
|
|
gofmt:
|
|
|
|
|
glob: "*.go"
|
|
|
|
|
run: gofmt -w {staged_files}
|
|
|
|
|
stage_fixed: true
|
2026-05-04 19:40:12 +00:00
|
|
|
golint:
|
2026-05-01 17:36:32 +00:00
|
|
|
glob: "*.go"
|
2026-05-04 19:43:20 +00:00
|
|
|
run: golangci-lint run --fix --new-from-rev=HEAD
|
2026-05-01 17:36:32 +00:00
|
|
|
stage_fixed: true
|
2026-03-21 19:39:30 +00:00
|
|
|
prettier:
|
|
|
|
|
glob: "*.{html,js,ts,vue,scss}"
|
2026-02-06 17:07:06 +00:00
|
|
|
run: prettier -w {staged_files}
|
|
|
|
|
stage_fixed: true
|