-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
39 lines (35 loc) · 1.07 KB
/
.pre-commit-config.yaml
File metadata and controls
39 lines (35 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
repos:
- repo: local
hooks:
# Add unit test run here
- id: run-editor-tests
name: Run Engine Editor Tests Before Commit
entry: |
bash -c '
if ! make test; then
echo ""
echo "❌ Engine tests failed during pre-commit."
echo "🧪 Run them manually with: make test"
echo "👉 Or bypass tests with: git commit --no-verify"
echo ""
exit 1
fi
'
language: system
pass_filenames: false
stages: [pre-commit]
- id: enforce-commit-prefix
name: Enforcing Commit Message Prefix
entry: scripts/enforce-commit-prefix.sh
language: system
pass_filenames: false
stages: [commit-msg]
# LINT-ONLY: fail if formatting is off
- id: swiftformat-lint
name: SwiftFormat (lint only)
entry: swiftformat
language: system
types: [swift]
pass_filenames: true
args: ["--lint", "--quiet"]
stages: [pre-commit]