@@ -17,20 +17,26 @@ Thanks for your interest in contributing to **aws-local-sync**! This guide outli
1717 cd aws-local-sync
1818 ```
1919
20- 2 . ** Explore available commands**
20+ 2 . ** Install Git hooks**
21+
22+ ``` sh
23+ make hooks # Install pre-commit hooks via lefthook
24+ ```
25+
26+ 3 . ** Explore available commands**
2127
2228 ``` sh
2329 make help
2430 ```
2531
26- 3 . ** Build and run**
32+ 4 . ** Build and run**
2733
2834 ``` sh
2935 make build # Build with version info
3036 make run # Build and execute
3137 ```
3238
33- 4 . ** Run tests and quality checks**
39+ 5 . ** Run tests and quality checks**
3440
3541 ``` sh
3642 make test # Run tests with race detection and coverage
@@ -40,16 +46,28 @@ Thanks for your interest in contributing to **aws-local-sync**! This guide outli
4046
4147## Development Workflow
4248
49+ ### Git Hooks
50+
51+ This project uses [ lefthook] ( https://github.com/evilmartians/lefthook ) for Git hooks to ensure code quality:
52+
53+ - ** Pre-commit hooks** automatically run:
54+ - ` golangci-lint ` with auto-fix for formatting issues
55+ - ` go mod tidy ` when go.mod changes are staged
56+ - ** Manual hook execution** : ` make hooks-run `
57+ - ** Bypass hooks** when necessary: ` git commit --no-verify `
58+
4359### Making Changes
4460
45611 . ** Before coding** : Run ` make audit ` to ensure a clean baseline
46- 2 . ** Format code** : Automatic via golangci-lint (includes goimports)
62+ 2 . ** Format code** : Automatic via pre-commit hooks or ` make lint `
47633 . ** Test your changes** : ` make test ` generates coverage reports
48- 4 . ** Lint check** : ` make lint ` catches style and potential issues
49- 5 . ** Final audit** : ` make audit ` before committing
64+ 4 . ** Lint check** : Automatic via pre-commit hooks or ` make lint `
65+ 5 . ** Final audit** : ` make audit ` before pushing
5066
5167### Useful Make Targets
5268
69+ - ` make hooks ` - Install Git hooks
70+ - ` make hooks-run ` - Manually run pre-commit checks
5371- ` make tidy ` - Clean up dependencies and format code
5472- ` make clean ` - Remove build artifacts
5573- ` make upgradeable ` - Check for dependency updates
0 commit comments