TypeDialog/CONTRIBUTING.md
2025-12-24 03:23:51 +00:00

115 lines
2.8 KiB
Markdown

# Contributing to TypeDialog
## Welcome
Thank you for considering contributing to TypeDialog! This document provides guidelines for contributing to the project.
## Development Setup
### Prerequisites
- Rust 1.75+ (see [rustup.rs](https://rustup.rs))
- just - command runner (`cargo install just`)
- Nickel - configuration language (`cargo install nickel-lang-cli`)
- Additional linters: shellcheck, nushell, markdownlint-cli2
### Quick Start
```bash
# Clone repository
git clone https://github.com/jesusperezlorenzo/typedialog.git
cd typedialog
# Check dependencies
./scripts/check_deps.sh
# Run full validation
just check-all
```
## Making Changes
### Development Workflow
1. **Create a branch**: `git checkout -b feature/my-feature`
2. **Make changes**: Follow coding standards below
3. **Run checks**: `just check-all` (format + lint + tests)
4. **Commit**: Write clear commit messages
5. **Push**: `git push origin feature/my-feature`
6. **Open PR**: Describe changes, link issues
### Coding Standards
#### Rust Code
- Follow Rust API guidelines
- Use `cargo fmt` for formatting
- Zero clippy warnings (`just dev::lint-rust`)
- Add tests for new functionality
- Document public APIs with rustdoc
#### Commit Messages
Format: `<type>(<scope>): <description>`
Types: feat, fix, docs, style, refactor, test, chore
Examples:
- `feat(cli): add --verbose flag for debug output`
- `fix(web): resolve CSRF token validation error`
- `docs(README): update installation instructions`
### Testing
- Unit tests: `cargo test --lib`
- Integration tests: `cargo test --test '*'`
- All tests: `just test::all`
- Coverage: `just dev::coverage`
## Pull Request Process
1. **Before submitting**:
- [ ] `just check-all` passes
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] CHANGELOG.md updated (if user-facing)
2. **PR template**: Fill out the template completely
3. **Review**: Address reviewer feedback
4. **Merge**: Maintainer will merge when approved
## Code Review Guidelines
We review for:
- Correctness and functionality
- Code quality and style
- Test coverage
- Documentation
- Security implications
## Reporting Bugs
Use GitHub Issues with template:
- **Title**: Clear, concise description
- **Environment**: OS, Rust version, TypeDialog version
- **Steps to reproduce**: Minimal example
- **Expected vs actual behavior**
- **Logs**: Use `--verbose` flag
## Feature Requests
Open a GitHub Discussion first for:
- Large features
- Breaking changes
- Architectural changes
## Security Vulnerabilities
**DO NOT** open public issues for security vulnerabilities.
See [SECURITY.md](SECURITY.md) for reporting process.
## Questions?
- Discussions: GitHub Discussions
- Chat: (if applicable)
- Email: jpl@jesusperez.com
## License
By contributing, you agree your contributions will be licensed under MIT License.