Thank you for your interest in contributing to mq! This document provides guidelines for contributing to the project.
Before contributing, please:
- Read the README.md to understand the project
- Check the documentation for detailed usage information
- Browse existing issues to see what's already being worked on
- Look at recent pull requests to understand the contribution process
- Rust 1.93 or later
- Git
- just command runner
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/mq.git cd mq -
Install dependencies:
cargo build
-
Run tests to ensure everything is working:
just test
- Formatting: All code must be formatted with
cargo fmt - Linting: Code must pass
cargo clippywithout warnings - Documentation: Add appropriate doc comments to all public functions, structs, traits, and enums
- Error Handling: Use the
miettecrate for error handling and provide user-friendly error messages - No Panics: Avoid panics whenever possible; return appropriate
Resulttypes instead - Testing: Write comprehensive tests for new functionality
- Each crate should have a clear, focused purpose
- Use
pub(crate)visibility unless wider exposure is necessary - Organize code into logical modules; avoid large, monolithic files
- Keep dependencies minimal and up-to-date
Always run the full test suite before submitting changes:
just test- Write comprehensive tests for all new features and bug fixes
- Use descriptive names for test functions and modules
- Prefer table-driven tests for similar input/output patterns
- Use
assert_eq!,assert!, and custom error messages for clarity - Keep tests fast and isolated
- Place integration tests in the
tests/directory, unit tests alongside implementation
Run tests with coverage reporting:
just test-cov- Ensure tests pass: Run
just testand fix any failures - Update documentation: Add or update documentation for new features
- Follow commit conventions: Use clear, descriptive commit messages
- Update
/docsand crate-levelREADME.mdfiles for new features
just docsWhen reporting bugs, please provide:
- A detailed description of the issue
- Steps to reproduce the problem
- Expected behavior vs. actual behavior
- Markdown and
mqquery examples that reproduce the issue - Your environment details (OS, Rust version, mq version)
When proposing new features, please include:
- A clear description of the use case
- Examples of the proposed syntax and behavior
- How it relates to existing features
- Potential implementation approach (if applicable)
This project is licensed under the MIT License. By contributing, you agree that your contributions will be licensed under the same license.
Thank you for contributing to mq! 🚀