Thank you for your interest in contributing to the D-Bus Client Java library! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Testing
- Submitting Changes
- Code Style
- Commit Messages
- Developer Certificate of Origin
By participating in this project, you are expected to uphold our Code of Conduct.
- Java 17 or higher
- Docker (for integration tests)
- Git
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/dbus-client-java.git cd dbus-client-java - Set up the upstream remote:
git remote add upstream https://github.com/lucimber/dbus-client-java.git
- Build the project:
./gradlew build
- Check existing issues to see if someone is already working on what you want to do
- Create an issue if one doesn't exist for your change
- Discuss your approach in the issue before starting work on large changes
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes following the Code Style guidelines
- Write tests for your changes
- Run tests to ensure everything works:
./gradlew test ./gradlew integrationTest - Commit your changes with appropriate commit messages
- Push to your fork:
git push origin feature/your-feature-name
Run unit tests with:
./gradlew testFor memory-intensive tests:
./gradlew test -PwithMemoryIntensiveTestsRun integration tests (containerized):
./gradlew integrationTestWith verbose output:
./gradlew integrationTest -PshowOutputRun performance tests:
./gradlew performanceTestGenerate coverage reports:
./gradlew jacocoTestReport-
Update your branch with the latest changes from upstream:
git checkout main git pull upstream main git checkout feature/your-feature-name git rebase main
-
Create a Pull Request on GitHub with:
- Clear description of the changes
- Reference to related issues
- Screenshots or examples if applicable
-
Address review feedback promptly and professionally
-
Ensure all checks pass:
- CI builds successfully
- All tests pass
- Code coverage is maintained or improved
- Keep PRs focused - one feature or bug fix per PR
- Write descriptive titles and descriptions
- Include tests for new functionality
- Update documentation if needed
- Follow the PR template provided
- Follow standard Java conventions
- Use 4 spaces for indentation (no tabs)
- Line length: 120 characters maximum
- Use meaningful variable and method names
- Add JavaDoc for public APIs
- No trailing whitespace
The project uses several code quality tools:
- Checkstyle: Enforces coding standards
- PMD: Static code analysis
- JaCoCo: Code coverage measurement
Run quality checks:
./gradlew check- Follow the existing patterns in the codebase
- Handlers can safely perform blocking operations - they run on dedicated thread pools
- Use the builder pattern for complex message construction
- Prefer immutable objects where possible
- Handle errors gracefully and provide meaningful error messages
type(scope): brief description
Detailed description if needed
- Additional details
- More information
Signed-off-by: Your Name <your.email@example.com>
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code formatting changes
- refactor: Code restructuring without behavior changes
- test: Adding or modifying tests
- ci: Changes to CI configuration
- perf: Performance improvements
feat(connection): add automatic reconnection support
Add exponential backoff retry logic for connection failures with
configurable max attempts and delay settings.
- Implement ReconnectionHandler with customizable strategy
- Add connection health monitoring
- Update documentation with reconnection examples
Signed-off-by: Jane Doe <jane.doe@example.com>
By contributing to this project, you certify that:
The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications; or
The contribution was provided directly to me by some other person who certified the above conditions and I have not modified it.
All commits must be signed off by adding the following line to your commit message:
Signed-off-by: Your Name <your.email@example.com>
Use the -s flag with git commit:
git commit -s -m "your commit message"- Public APIs: All public methods and classes need JavaDoc
- Architecture decisions: Document why, not just what
- Examples: Provide working examples for new features
- Configuration: Document all configuration options
- Use JavaDoc for API documentation
- Use Markdown for user guides and tutorials
- Include code examples that actually work
- Keep documentation up to date with code changes
- Issues: Use GitHub issues for bug reports and feature requests
- Discussions: Use GitHub discussions for questions and ideas
- Documentation: Check the developer guide for detailed information
Contributors are recognized in:
- Git commit history
- GitHub contributor statistics
- Release notes (for significant contributions)
Thank you for contributing to D-Bus Client Java! 🚀