Instruction file imported from harehare/mq (
.github/instructions/general.instructions.md). Copyright stays with the author.
General Coding Conventions for mq
- Follow Rust best practices and idioms for all Rust code.
- Use meaningful variable, function, and type names.
- Write concise, clear, and specific comments and documentation.
- Avoid magic numbers; use named constants.
- Prioritize code readability and maintainability.
- All code must be formatted with
cargo fmtand passcargo clippy. - Use the
miettecrate for error handling and provide user-friendly error messages. - Avoid panics; return appropriate
Resulttypes instead. - All public items (functions, structs, traits, enums, etc.) must have documentation comments.
- Update or add tests for all new or changed functionality.
- All changes must be reflected in
CHANGELOG.md. - Ensure all contributions are compatible with the MIT License.
Directory Structure
The mq project follows this main directory structure:
/crates- Contains multiple Rust cratesmq-c-api- C API for integrating mq functionality into C applicationsmq-run- Implementation of the mq command-line interfacemq-crawler- Tool for crawling directories and collecting Markdown files for batch processingmq-formatter- Code formattermq-hir- High-level Internal Representation (HIR)mq-lang- Implementation of the mqmq-lsp- Language Server Protocol implementationmq-markdown- Markdown parser and manipulation utilitiesmq-repl- REPL (Read-Eval-Print Loop) for mqmq-wasm- WebAssembly (Wasm) implementation for running mq in browsers and other WASM environmentsmq-web-api- Web API bindings for mq
/docs- Documentation and user guides/editors- Editor integrations and plugins for popular code editors/assets- Static assets such as images, icons, and other resources/examples- Usage examples/tests- Integration tests/scripts- Scripts for automation tasks/packages- Contains various packages for different functionalitiesmq-web- npm package for using mq in web applications and JavaScript environmentsplayground- A playground for developing and testing for mq
Feature Requests
When proposing feature additions to mq, please include the following information:
- A description of the use case
- Examples of the proposed syntax and behavior
- Relationship to existing features
Bug Reports
When reporting bugs, provide the following information:
- A detailed description of the issue
- Steps to reproduce
- Expected behavior vs. actual behavior
- If possible, Markdown and
mqquery examples that reproduce the issue
License
This project is provided under the MIT License. All contributions must be compatible with this license. Please include the license header in new files as appropriate.