Contributing to Pure Assert
February 6, 2026 ยท View on GitHub
Thank you for your interest in contributing to Pure Assert! This document provides guidelines and instructions for contributing.
Code of Conduct
Be respectful and constructive in all interactions. We welcome contributors of all experience levels.
How to Contribute
Reporting Bugs
- Check if the issue already exists in the Issues section.
- If not, create a new issue with:
- A clear title
- Steps to reproduce
- Expected vs. actual behavior
- Java version and environment details
Suggesting Features
Open an issue with the enhancement label. Describe:
- The use case
- The proposed API (if applicable)
- Why it fits this library's philosophy
Pull Requests
- Fork the repository and create a branch from
main. - Write tests for any new functionality.
- Follow the code style: no external dependencies, comprehensive Javadoc.
- Run the build:
mvn clean verify - Submit your PR with a clear description.
Development Setup
Prerequisites
- Java 15+
- Maven 3.8+
Building
mvn clean install
Running Tests
mvn test
Generating Javadoc
mvn javadoc:javadoc
Guidelines
Zero Dependencies
This library is intentionally zero-dependency. Do not add any runtime dependencies. The maven-enforcer-plugin will reject any transitive dependencies.
Javadoc
All public classes and methods must have Javadoc comments. Run mvn javadoc:javadoc to check for warnings.
Exception Design
When adding new exceptions:
- Extend
AssertionException - Implement
type()returning an appropriateAssertionErrorType - Use a builder pattern for complex exceptions
- Include the field name and relevant metadata
Asserter Design
When adding new asserters (e.g., StringAsserter):
- Follow the fluent API pattern
- Return
thisfor chaining - Include a
value()method to retrieve the validated value - Throw specific exceptions, not generic ones
Questions?
Feel free to open an issue for any questions about contributing.
Thank you for helping make Pure Assert better! ๐