Thank you for your interest in contributing to vim-review! This document provides guidelines and information for contributors.
Be respectful, inclusive, and constructive in all interactions.
When filing a bug report, please include:
- Your operating system and version
- Rust version (
rustc --version) - Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Any error messages or logs
Feature suggestions are welcome! Please:
- Check if the feature has already been requested
- Describe the use case and motivation
- Explain how it would work
- Consider implementation complexity
-
Fork and Clone
git clone https://github.com/bobrenjc93/vr.git cd vr -
Create a Branch
git checkout -b feature/your-feature-name
-
Make Changes
- Write clean, readable code
- Follow existing code style
- Add comments for complex logic
- Update documentation as needed
-
Test Your Changes
cargo test cargo clippy cargo fmt -
Commit
git add . git commit -m "Add feature: your feature description"
Commit message format:
- Use present tense ("Add feature" not "Added feature")
- Keep first line under 72 characters
- Add detailed description if needed
-
Push and Create PR
git push origin feature/your-feature-name
Then create a pull request on GitHub.
- Rust 1.70 or later
- Git
# Development build
cargo build
# Release build
cargo build --release
# Run
cargo run
# Run with arguments
cargo run -- HEAD# Run all tests
cargo test
# Run specific test
cargo test test_name
# Run tests with output
cargo test -- --nocapture# Format code
cargo fmt
# Check formatting without modifying
cargo fmt -- --check
# Run linter
cargo clippy
# Run clippy with stricter checks
cargo clippy -- -D warningssrc/
├── main.rs # Entry point, CLI handling
├── app.rs # Application state and logic
├── git.rs # Git operations
├── diff.rs # Diff parsing
├── comment.rs # Comment persistence
├── vim.rs # Vim keybinding handlers
└── tui.rs # Terminal UI rendering
- Use 4 spaces for indentation
- Follow Rust naming conventions
- Keep functions focused and small
- Add doc comments for public APIs
- Run
cargo fmtbefore committing
- Minimize new dependencies when possible
- Prefer well-maintained crates
- Update
Cargo.tomlwith appropriate version constraints - Document why the dependency is needed in your PR
- Update README.md for user-facing changes
- Update CHANGELOG.md following Keep a Changelog
- Add doc comments for new public functions
- Update examples if behavior changes
- Open an issue for questions
- Check existing issues and PRs
- Read the code - it's well-commented!
By contributing, you agree that your contributions will be licensed under the MIT License.