-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathlefthook.yml
More file actions
40 lines (36 loc) · 1.25 KB
/
lefthook.yml
File metadata and controls
40 lines (36 loc) · 1.25 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
40
# This file configures Lefthook, a Git hooks manager, for the project.
# For detailed instructions on how to contribute and set up Lefthook,
# please refer to the relevant section in the contributing documentation (CONTRIBUTING.md).
pre-commit:
commands:
golangci-lint-fmt:
run: golangci-lint fmt
stage_fixed: true
pre-push:
commands:
check-generated-files:
run: |
echo "Checking all generated files are up-to-date..."
# Check OpenAPI client
make generate-api
if ! git diff --quiet internal/api/client/; then
echo "❌ OpenAPI client is outdated. Please run 'make generate-api' and commit the changes."
exit 1
fi
# Check documentation
make generate-docs
if ! git diff --quiet docs/; then
echo "❌ Documentation is outdated. Please run 'make generate-docs' and commit the changes."
exit 1
fi
# Check schema
make generate-schema
if ! git diff --quiet schema/; then
echo "❌ Schema is outdated. Please run 'make generate-schema' and commit the changes."
exit 1
fi
echo "✅ All generated files are up-to-date"
skip: false
tests:
run: make test
skip: false