docs: Format CONTRIBUTING.md

* Correct auto-format command in CONTRIBUTING.md

* Format CONTRIBUTING.md

* Convert some inline code snippets to block code snippets.
* Delete trailing spaces.
This commit is contained in:
relrelb 2020-11-07 23:04:51 +02:00 committed by GitHub
parent 0dcc7575db
commit 31a558f5b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 9 deletions

View File

@ -105,28 +105,36 @@ Ruffle is built using the latest stable version of the Rust compiler. Nightly an
The Rust code in Ruffle strives to be idiomatic. The Rust compiler should emit no warnings when building the project. Additionally, all code should be formatted using [`rustfmt`](https://github.com/rust-lang/rustfmt) and linted using [`clippy`](https://github.com/rust-lang/rust-clippy). You can install these tools using `rustup`:
```
```sh
rustup component add rustfmt
rustup component add clippy
```
You can auto-format your changes with `rustfmt`:
`cargo run fmt --all`
```sh
cargo fmt --all
```
and you can run the clippy lints:
`cargo clippy --all --tests`
```sh
cargo clippy --all --tests
```
Specific warnings and clippy lints can be allowed when appropriate using attributes, such as:
`#[allow(clippy::float_cmp)]`
```rs
#[allow(clippy::float_cmp)]
```
## Commit Message Guidelines
Here is a sample commit message:
`web: Fix incorrect rendering of gradients (close #23)`
```
web: Fix incorrect rendering of gradients (close #23)
```
* If applicable, prefix the first line with a tag indicating the relevant area of changes:
* `core:`