Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 3.28 KB

File metadata and controls

54 lines (41 loc) · 3.28 KB

Contributing to YOUR PROJECT NAME HERE

  1. Development Workspace Setup
  2. Commands
  3. Formatting and Linting Code
  4. Code Policy

Development Workspace Setup

The main facility used for interacting with this project's lifecycle (build/test/format/lint) is cargo-make. Therefore, this is the only dependency you need to install on your machine in order to make all of this project's commands available to you:

cargo install cargo-make

Commands

Note: cargo-make will automatically fetch crates and toolchain components on an as-needed basis when you run these commands. Given this behavior, you should never need to issue a cargo install command unless you are installing new dependencies.

Command Description/Function
cargo make clean Clean up temporary files
cargo make build Lint and build the project
cargo make run Run the application
cargo make test Run all unit tests
cargo make test-coverage Run all unit tests and write a code coverage report to STDOUT
cargo make test-coverage-ci Run all unit tests and write a code coverage report to a text file in LCOV format
cargo make format Format (rewrite) every applicable file in the project
cargo make format-ci Format (report only) every applicable file in the project
cargo make lint Lint (report only) every applicable file in the project
cargo make lint-watch Lint (report only) every applicable file in the project and re-lint whenever files change
cargo make outdated Write a summary of outdated dependencies to STDOUT

Formatting and Linting Code

This project uses rustfmt to handle formatting, and contributions to its code are expected to be formatted with rustfmt (within reason) using the settings in rustfmt.toml.

This project uses rust-clippy to handle linting, and contributions are expected to be checked using the settings in clippy.toml.

Note: rustfmt and rust-clippy each have many built-in defaults to which this project will defer in the absence of a corresponding rule in rustfmt.toml/clippy.toml.

Code Policy

Code contributed to this project should follow the Rust API Guidelines as much as possible (even if this project is an application rather than a library).