git clone https://github.com/kwlockwo/dfl-manager.git
cd dfl-manager/codeImportant: Run this setup script to install automated testing hooks:
.githooks/setup.shThis will configure git to run tests automatically before each commit, ensuring code quality.
-
Make sure you're on the latest main branch:
git checkout main git pull origin main
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your code changes
-
Run tests manually to verify:
mvn test -
Commit your changes:
git add . git commit -m "Your commit message"
Note: The pre-commit hook will automatically run tests. If they fail, your commit will be blocked.
The pre-commit hook automatically runs BaseHandlerTest before each commit:
- ✅ If tests pass → commit proceeds
- ❌ If tests fail → commit is blocked
To skip the hook (not recommended):
git commit --no-verify -m "Your message"mvn testmvn test -Dtest=BaseHandlerTestmvn test -q- All handlers must extend
BaseHandler - Use
ServiceFactoryfor service instantiation - Call
ensureLoggingConfigured()at the start ofexecute()methods
- Create services via
ServiceFactory.getInstance().createXxxService() - Never use
new XxxServiceImpl()directly
- Use
TransactionHelper.executeInTransaction()for database operations - This provides automatic rollback on exceptions
-
Push your feature branch:
git push origin feature/your-feature-name
-
Create a pull request on GitHub
-
Ensure all tests pass in CI
-
Request review from maintainers
-
Address any feedback
-
Once approved, it will be merged to main
mvn clean compilemvn clean packageIf the pre-commit hook isn't running:
-
Check if hooks are configured:
git config core.hooksPath
Should output:
.githooks -
Re-run the setup script:
.githooks/setup.sh
-
Verify hook is executable:
ls -la .githooks/pre-commit
-
Make sure you're on the latest main:
git checkout main git pull
-
Clean and rebuild:
mvn clean compile
-
Run tests:
mvn test
- Check the TEST_SUMMARY.md for testing documentation
- Review .githooks/README.md for git hooks documentation
- Open an issue on GitHub for help
[Add your license information here]