# Contributing to error-location
Thank you for your interest in contributing to error-location! This document provides guidelines and instructions for contributing.
## Code of Conduct
Be respectful and constructive in all interactions. We're here to build something useful together.
## How to Contribute
### Reporting Bugs
If you find a bug, please open an issue with:
- A clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Rust version and platform information
### Suggesting Features
Feature suggestions are welcome! Please open an issue describing:
- The use case for the feature
- How it would work
- Why it fits with the crate's goals
### Pull Requests
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Run tests: `cargo test`
5. Run clippy: `cargo clippy --all-targets --all-features -- -D warnings`
6. Run rustfmt: `cargo fmt --all`
7. Commit your changes (`git commit -m 'Add some amazing feature'`)
8. Push to the branch (`git push origin feature/amazing-feature`)
9. Open a Pull Request
## Development Setup
```bash
# Clone the repository
git clone https://github.com/yourusername/error-location.git
cd error-location
# Run tests
cargo test
# Check formatting
cargo fmt --all -- --check
# Run clippy
cargo clippy --all-targets --all-features -- -D warnings
# Build documentation
cargo doc --no-deps --open
```
## Code Guidelines
- Follow Rust naming conventions
- Add documentation for public APIs
- Include tests for new functionality
- Keep the crate focused and lightweight
- Avoid adding dependencies unless absolutely necessary
- Use `#[track_caller]` where appropriate
## Testing
All code changes should include tests. Run the test suite with:
```bash
cargo test --all-features
```
## Documentation
- Public APIs must have documentation comments
- Include examples in doc comments where helpful
- Update README.md if adding new features
## Commit Messages
- Use clear, descriptive commit messages
- Reference issue numbers when applicable
- Use present tense ("Add feature" not "Added feature")
## Questions?
Feel free to open an issue for any questions about contributing!
## License
By contributing, you agree that your contributions will be licensed under the same MIT/Apache-2.0 dual license as the project.