Thank you for your interest in contributing to ObservedKeyPathsMacros! This document provides guidelines and information for contributors.
- Fork the repository on GitHub
- Clone your fork locally
- Create a feature branch for your changes
- Make your changes following the guidelines below
- Test your changes thoroughly
- Submit a pull request
- Xcode 15.0+
- Swift 5.10+
- iOS 17.0+ / macOS 10.15+
# Clone the repository
git clone https://github.com/yourusername/ObservedKeyPathsMacros.git
cd ObservedKeyPathsMacros
# Build the package
swift build
# Run tests
swift test# Run all tests
swift test
# Run specific test
swift test --filter ObservedKeyPathsMacrosTests/testBasicMacroExpansion- Follow Swift API Design Guidelines
- Use 4 spaces for indentation
- Prefer
letovervarwhen possible - Use meaningful variable and function names
- Add documentation comments for public APIs
- Keep macro logic simple and focused
- Add comprehensive error handling
- Include helpful error messages
- Test edge cases thoroughly
- Write tests for all new functionality
- Include positive and negative test cases
- Test edge cases and error conditions
- Ensure tests are deterministic and fast
- Use descriptive test names
- Group related tests in test classes
- Use
XCTAssertmacros appropriately - Clean up resources in
tearDown()
- Ensure tests pass locally
- Update documentation if needed
- Add changelog entry for user-facing changes
- Check code formatting and style
- Describe the problem being solved
- Explain the solution approach
- Include any relevant issue numbers
- Add screenshots for UI changes
- All PRs require at least one review
- Address review comments promptly
- Keep discussions constructive and focused
- Be open to feedback and suggestions
When reporting bugs, please include:
- Environment details (OS, Xcode version, Swift version)
- Steps to reproduce the issue
- Expected vs actual behavior
- Code samples if applicable
- Screenshots for UI issues
For feature requests, please describe:
- Use case and problem being solved
- Proposed solution or approach
- Alternative solutions considered
- Impact on existing functionality
- GitHub Issues for bug reports and feature requests
- GitHub Discussions for general questions and ideas
- Pull Request comments for code-specific discussions
- Be respectful and inclusive
- Focus on the code and technical aspects
- Help others learn and grow
- Report inappropriate behavior to maintainers
If you need help with contributing:
- Check existing documentation and issues
- Ask questions in GitHub Discussions
- Open an issue for specific problems
- Reach out to maintainers directly
Thank you for contributing to ObservedKeyPathsMacros! 🚀