Thank you for considering contributing to the ProxyCheck.io API Client! This document provides guidelines and instructions for contributing to this project.
Please be respectful and considerate of others when contributing to this project. We aim to foster an inclusive and welcoming community.
There are many ways to contribute to this project:
- Reporting bugs
- Suggesting enhancements
- Writing documentation
- Submitting code changes
- Reviewing pull requests
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/ProxycheckIOApi.git
- Create a branch for your changes:
git checkout -b feature/your-feature-name
- Make your changes
- Run tests (once they are implemented):
./gradlew test
- Commit your changes:
git commit -m "Add your feature description"
- Push to your fork:
git push origin feature/your-feature-name
- Create a pull request
- Ensure your code follows the project's coding style
- Update the README.md with details of changes if applicable
- Add tests for your changes if applicable
- Make sure all tests pass
- Your pull request will be reviewed by the maintainers
- Follow Kotlin coding conventions
- Write clear, concise, and descriptive code
- Document your code with KDoc comments
- Write unit tests for your code
When adding new features or fixing bugs, please add tests to verify your changes. We use JUnit 5 for testing.
Tests should be organized as follows:
-
Unit Tests: Test individual components in isolation
- Place in the same package as the class being tested
- Name the test class as
[ClassUnderTest]Test
- Use mocks for dependencies when appropriate
-
Integration Tests: Test interactions between components
- Place in a separate package with
.integration
suffix - Focus on testing the integration points between components
- Place in a separate package with
-
API Tests: Test the public API of the library
- Place in a separate package with
.api
suffix - Test the behavior of the API from a client perspective
- Place in a separate package with
- Each test method should test a single behavior
- Use descriptive test method names that explain what is being tested
- Follow the Arrange-Act-Assert pattern
- Add comments to explain complex test setups
- Use parameterized tests for testing multiple inputs
- Mock external dependencies (like the ProxyCheck.io API) for unit tests
./gradlew test
Please report bugs by opening an issue on the GitHub Issues page.
When reporting bugs, please include:
- A clear and descriptive title
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Screenshots if applicable
- Your environment (OS, Java version, etc.)
We follow a simplified Git flow branching strategy:
main
- The main branch containing stable, released codedevelop
- The development branch for integrating featuresfeature/*
- Feature branches for new features or enhancementsbugfix/*
- Bugfix branches for fixing issuesrelease/*
- Release branches for preparing releases
- Feature branches:
feature/short-description
- Bugfix branches:
bugfix/issue-number-short-description
- Release branches:
release/version-number
- Create a new branch from
develop
for your feature or bugfix - Make your changes and commit them
- Push your branch to your fork
- Create a pull request to the
develop
branch - After review and approval, your changes will be merged
All code changes require a code review before being merged. Here's what reviewers will look for:
- Functionality: Does the code work as expected?
- Code Quality: Is the code well-written, maintainable, and follows best practices?
- Documentation: Are the changes properly documented with KDoc comments?
- Tests: Are there appropriate tests for the changes?
- Performance: Are there any performance concerns with the changes?
- Security: Are there any security concerns with the changes?
- Be respectful and constructive in your feedback
- Focus on the code, not the person
- Explain why you're suggesting changes
- Provide examples or references when appropriate
Please suggest enhancements by opening an issue on the GitHub Issues page with the "enhancement" label.
When suggesting enhancements, please include:
- A clear and descriptive title
- A detailed description of the enhancement
- Why this enhancement would be useful
- Any examples or mockups if applicable
By contributing to this project, you agree that your contributions will be licensed under the project's MIT License.