First off, thank you for investing your time in improving Riva! The following guidelines help us review changes consistently and keep the project healthy.
- Be excellent to each other. Read and follow the expectations laid out in
CODE_OF_CONDUCT.md. - Prefer public issues for bugs and feature requests so everyone can follow along.
- Keep changes focused. Small, reviewable pull requests land faster.
- Install the latest stable Rust toolchain (
rustup default stable). - Clone the repo and install dependencies:
git clone https://github.com/resonix-dev/riva.git cd riva cargo fetch - Enable only the providers you need when iterating:
cargo test --no-default-features --features youtube.
- Discuss – open an issue (or comment on an existing one) to describe what you plan to change.
- Develop – branch off
mainand write your code plus tests:git checkout -b feature/my-change cargo fmt cargo clippy --all-targets --all-features -- -D warnings cargo test - Document – update
README.md,CHANGELOG.md, or relevant docs whenever behavior changes. - Pull Request – fill out the PR template and ensure the CI workflow is green.
- Unit tests live next to the modules they cover (for example,
src/providers/soundcloud/extractor.rs). - Integration tests live under
tests/. Add a new file when validating a cross-module flow. - Prefer deterministic fixtures over live API calls. Record small JSON snippets when needed.
- Run
cargo fmtbefore committing. - Treat Clippy warnings as errors (
cargo clippy -- -D warnings). - Keep functions small and focused. Extract helpers if a function grows beyond ~40 lines.
- When adding comments, explain why rather than what.
- Use the imperative mood ("Fix race condition" not "Fixed").
- Reference issues when relevant:
Fix #123: normalize YouTube shorts URLs.
- Update
CHANGELOG.mdwith noteworthy changes. - Bump
Cargo.toml. - Tag the release (
git tag vX.Y.Z && git push --tags).
If you have any questions, feel free to open a discussion or ping a maintainer in your issue/PR. Happy hacking! 🚀