Skip to content

Latest commit

 

History

History
70 lines (47 loc) · 2.1 KB

CONTRIBUTING.md

File metadata and controls

70 lines (47 loc) · 2.1 KB

Contributing code to redact-engine

Everyone is welcome to contribute code to redact-engine, provided that they are willing to license their contributions under the same license as the project itself. We follow a simple 'inbound=outbound' model for contributions: the act of submitting an 'inbound' contribution means that the contributor agrees to license the code under the same terms as the project's overall 'outbound' license - in this case, Apache Software License v2 (see LICENSE).

How to contribute

The preferred and easiest way to contribute changes to the project is to fork it on GitHub, and then create a pull request to ask us to pull your changes into our repo.

Things that should go into your PR description:

  • References to any bugs fixed by the change
  • Notes for the reviewer that might help them to understand why the change is necessary or how they might better review it

Your PR must also:

Tests

In redact-engine we have few test suite flows that need to pass before merging to master.

unitest

run the following command:

cargo xtask test

Include feature flag:

cargo xtask test -- --features redact-json

To capture the snapshots test we using insta rust project. you can see the snapshot changes / new snapshot by running the command:

cargo insta test --review

clippy

cargo xtask clippy

rustfmt

cargo xtask clippy

Code style

We use the standard Rust code style, and enforce it with rustfmt/cargo fmt. A few code style options are set in the .rustfmt.toml file, and some of them are not stable yet and require a nightly version of rustfmt.

documentation

Generate and open redact-engine to make sure that your documentation os current

cargo xtask docs-preview