Thank you for your interest in contributing to GoArchTest! This document provides guidelines and instructions for contributing to the project.
Please read and follow our Code of Conduct to maintain a respectful and inclusive community.
There are many ways to contribute to GoArchTest:
- Reporting bugs
- Suggesting enhancements
- Improving documentation
- Adding new features
- Fixing bugs
- Writing tests
- Fork the repository
- Clone your fork locally
- Create a new branch for your changes
- Make your changes
- Run tests to ensure everything works
- Submit a pull request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/goarchtest.git
cd goarchtest
# Add the original repository as a remote
git remote add upstream https://github.com/solrac97gr/goarchtest.git
# Create a new branch for your changes
git checkout -b feature/your-feature-namego test ./...- Update the README.md and documentation with details of changes if appropriate
- Update examples if you've added or changed functionality
- Make sure all tests pass
- Your pull request will be reviewed by the maintainers
- Once approved, your changes will be merged
- Follow Go's official Code Review Comments
- Use gofmt to format your code
- Add comments explaining non-obvious code
- Write tests for new functionality
- Follow the existing code style and structure
GoArchTest is organized into several components:
- Core Types and Predicates: The foundation for architecture testing
- Pattern Validators: Pre-defined architectural pattern rules
- Reporting Tools: Error reporting and visualization
When adding new features, consider which component your changes fit into.
GoArchTest is structured as follows:
- Core Analysis: Uses
golang.org/x/tools/go/packagesfor type analysis - Predicates: Filtering and checking architecture rules
- Architecture Patterns: Predefined architectural patterns
- Reporting Tools: Error reporting and visualization
When adding new features or modifying the core analysis components, please ensure you understand how the Go type system and package loader work. The project has moved away from using the deprecated ast.Package in favor of the more robust type checking system.
Feature requests are welcome! To suggest a new feature:
- Check the issue tracker to see if it's already been suggested
- If not, create a new issue with the "enhancement" label
- Clearly describe the feature and why it would be valuable
When reporting bugs, please include:
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Go version and environment information
- Code examples if applicable
By contributing to GoArchTest, you agree that your contributions will be licensed under the project's MIT License.
If you have questions about contributing, feel free to open an issue or contact the maintainers.