Thank you for your interest in contributing to hl! This document provides guidelines and instructions for contributing to the project.
- Issues vs Discussions
- Reporting Bugs
- Requesting Features
- Contributing Code
- Development Setup
- Code Style
To keep the issue tracker focused and organized, we use Issues for actionable items and Discussions for questions and general conversation.
| Type | Use Issues | Use Discussions |
|---|---|---|
| 🐛 Bug reports | ✅ Yes | ❌ No |
| ✨ Feature requests | ✅ Yes | ❌ No |
| ❓ Questions ("How do I...?") | ❌ No | ✅ Yes |
| 💡 Ideas & brainstorming | ❌ No | ✅ Yes |
| 💬 General discussions | ❌ No | ✅ Yes |
| 🆘 Help & support | ❌ No | ✅ Yes |
Use Issues for:
- Bug reports: Something is broken or not working as documented
- Feature requests: Concrete proposals for new features or enhancements
Use Discussions for:
- Questions: How to use hl, configuration help, troubleshooting
- Ideas: Brainstorming and discussing potential features before creating a formal request
- General feedback: Sharing thoughts, experiences, or use cases
- Community support: Getting help from other users
If you've found a bug, please create a bug report using our bug report template.
- Search existing issues to see if the bug has already been reported
- Check Discussions to see if others have encountered the same problem
- Update to the latest version of hl to see if the bug has been fixed
- Try to reproduce the bug with minimal steps
- Clear description: What is the bug?
- Steps to reproduce: Detailed steps to reproduce the behavior
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Environment details:
- hl version (
hl --version) - Operating system and version
- Terminal emulator
- Shell (bash, zsh, fish, etc.)
- hl version (
- Logs or error messages: Any relevant output or error messages
- Sample data: If possible, provide a minimal log file that reproduces the issue
If you have an idea for a new feature or enhancement, please create a feature request using our feature request template.
- Search existing issues and discussions to see if the feature has been requested
- Consider starting a discussion first if you want feedback on your idea
- Think about the use case: How would this feature benefit you and other users?
- Feature description: Clear and concise description of the feature
- Motivation and use case: Why you need this feature and what problem it solves
- Example usage: Show how you would use the feature (commands, configuration, output)
- Alternatives considered: Any workarounds or alternative solutions you've thought about
We welcome code contributions! Here's how to get started:
- Fork the repository and create a new branch for your changes
- Set up your development environment (see Development Setup)
- Make your changes with clear, focused commits
- Test your changes thoroughly
- Submit a pull request with a clear description of your changes
- Keep changes focused: One feature or bug fix per pull request
- Follow existing code style: Match the style of the existing codebase
- Write clear commit messages: Describe what and why, not just how
- Update documentation: If your changes affect user-facing behavior
- Add tests: For new features or bug fixes when applicable
- Keep the PR description clear: Explain the problem and your solution
- Maintainers will review your pull request and may suggest changes
- Address review feedback by pushing additional commits to your branch
- Once approved, a maintainer will merge your pull request
hl is written in Rust. Here's how to set up your development environment:
- Rust (latest stable version recommended)
- A Rust-compatible IDE or editor (VS Code with rust-analyzer, IntelliJ IDEA, etc.)
# Clone your fork
git clone https://github.com/YOUR_USERNAME/hl.git
cd hl
# Build the project
cargo build
# Run tests
cargo test
# Run hl
cargo run -- --help# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run a specific test
cargo test test_namecargo bench- Follow Rust's official style guidelines
- Use
cargo fmtto format your code before committing - Use
cargo clippyto catch common mistakes and improve your code - Write clear, descriptive variable and function names
- Add comments for complex logic or non-obvious behavior
Run these commands to ensure your code meets the project's standards:
# Format code
cargo fmt
# Check for common mistakes
cargo clippy
# Run tests
cargo testIf you have any questions about contributing, please:
- Check the Discussions to see if your question has been answered
- Start a new discussion in the Q&A category
Thank you for contributing to hl! 🎉