Before You Start
Before making significant changes:- Discuss your proposed changes via GitHub Issues
- Check existing issues and pull requests to avoid duplicates
- Review the Code of Conduct
- Join the community on Discord or Matrix
Development Setup
Install nightly toolchain
The nightly toolchain is required for Optionally, configure your editor/IDE to use the nightly toolchain for formatting in this repository.
rustfmt:Development Workflow
Making Changes
-
Create a branch from
main: -
Follow Conventional Commits:
All commits should follow the Conventional Commits specification:
Types:
feat,fix,docs,refactor,test,chore,ci,perf,styleExamples: -
Write or update tests:
Add tests for new features or update existing tests for changes:
All tests must pass before submitting a PR.
Testing
Run all tests
Update snapshot tests
If you’ve changed output formats or templates, update snapshots:expect-test crate to verify output matches expected values.
Run specific tests
Test with features
Code Quality Checks
Before submitting a PR, run all quality checks locally:Clippy (required)
Run Clippy with warnings treated as errors:Clippy pedantic (optional but recommended)
For additional linting guidance:Pedantic lints are optional but recommended for new code. You may allow specific pedantic lints with clear justification in comments.
Formatting (required)
Check formatting with nightly rustfmt:Project Structure
Understand the workspace layout:Submitting a Pull Request
Ensure all checks pass
Before submitting, verify:
- ✅ All tests pass:
cargo test - ✅ Clippy succeeds:
cargo clippy --tests -- -D warnings - ✅ Code is formatted:
cargo +nightly fmt --all -- --check - ✅ Documentation is updated (if applicable)
Create pull request
- Go to the git-cliff repository
- Click “New Pull Request”
- Select your fork and branch
- Fill out the PR template
Pull Request Guidelines
PR Description
Provide a clear description that includes:- What changed
- Why the change was made
- How it was implemented
- Testing performed
- Related issues (e.g., “Fixes #123”)
Documentation
Update documentation if your changes affect:- User-facing features
- Configuration options
- Command-line arguments
- API interfaces
Breaking Changes
If your PR includes breaking changes:- Mark commits with
BREAKING CHANGE:in the footer - Clearly explain the breaking change in the PR description
- Provide migration guidance for users
Code Style
Rust Conventions
- Follow the Rust API Guidelines
- Use descriptive variable and function names
- Add doc comments for public APIs
- Prefer
Resultoverunwrap()(enforced by clippy) - Use
?operator for error propagation
Documentation Comments
Write documentation for public items:Error Handling
Use the project’sResult type:
Toolchain Information
Stable vs Nightly
- Stable Rust (1.85.1+): Used for builds and tests
- Nightly Rust: Required only for formatting with unstable
rustfmtoptions
Rust Edition
The project uses Rust 2024 edition:Getting Help
If you need assistance:- GitHub Issues: Report bugs or request features
- GitHub Discussions: Ask questions
- Discord: Join the community
- Matrix: Chat on Matrix
License
By contributing, you agree that your contributions will be licensed under: You may choose either license for your use.Recognition
All contributors are recognized in:- The CHANGELOG.md
- The README.md contributors section
- GitHub’s contributor graph