Please follow the following guidelines for contributing to ProcessCache.
- Every commit should represent a working, testable, version of ProcessCache, please squash commits as needed to have every commit represent a logical, working state of ProcessCache.
- Please add tests for any change made to ProcessCache if possible. This will avoid future regressions, and ensure your modifications works as intended.
- Please submit a pull request with your changes. We should all do a better job and hold each other accountable for reviews and quick pull request merges to keep things moving along.
- Use rebase instead of merge when updating your branch with the latest ProcessCache changes. For more information see Servo's "Beginner's guide to rebasing and squashing"
- Keep pull request commit numbers short when possible. It is hard/impossible to follow pull requests consisting of too many commits!
On every commit and pull request, your changes will run on Azure Pipelines. The project page can be found here. The pipelines steps are specified by this yaml file. The following checks will run on every commit:
- Style: Runs Rust's
rustfmtandclippy. Make sure both report no warnings locally before pushing to github. - Compile and Test: Runs
cargo checkandcargo testfor both the latest stable and nightly Rust. We expect no warnings and all tests to pass. - Docs: Runs
cargo docto check the documentation for the project builds.
If any of the above fail, your code will be rejected. See below for more on rustfmt and clippy.
Sometimes it is wasteful to run the CI on certain commits (any changes that don't affect the code, e.g. committing a markdown file like this one!). You can add [skip ci] in the body of the commit message!
Clippy is the Rust linter with many helpful lints to keep your code idiomatic. Rust format is an automatic formatter for your Rust code (never worry about formatting your code again!). You may install both for your current default Rust toolchain by doing:
> rustup install cargo-fmt
> rustup component add clippyInside the project repository you can run the following commands to run either tool (it is that easy!). The code probably needs to be compiling for the tools to work.
> cargo clippy
> cargo fmtPlease run both tools before doing a pull request.
The following are useful branches for the project:
- master: 🙇
- azure-pipeliness: If you wanna update anything about the CI, please make changes and pushes to this branch for pull requesting!
- documentation: Please commit here for any changes to the project README.md or CONTRIBUTING.md.