Update linters.md with info about cargo ci xtask (#1507)

Update `linters.md` with info about `cargo ci` xtask as per https://github.com/bevyengine/bevy/pull/1463#pullrequestreview-593747890

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
This commit is contained in:
Nathan Stocks 2021-04-12 19:11:40 +00:00
parent ed36c21e7e
commit 60f286d56d

View file

@ -1,21 +1,23 @@
# Linters in this Repository
## [rustfmt](https://github.com/rust-lang/rustfmt)
## Code Format Linting with [rustfmt](https://github.com/rust-lang/rustfmt)
Can be automatically be run with the [CI Script](../tools/ci) together with `Clippy` or manually with this command:
Can be automatically validated with [`cargo run -p ci`](../tools/ci) (which also runs other checks). Running this command will actually format the code:
```bash
cargo +nightly fmt --all
cargo fmt --all
```
## [Clippy](https://github.com/rust-lang/rust-clippy)
## Code Linting with [Clippy](https://github.com/rust-lang/rust-clippy)
Can be automatically be run with the [CI Script](../tools/ci) together with `rustfmt` or manually with this command:
Can be automatically run with [`cargo run -p ci`](../tools/ci) (which also runs other checks) or manually with this command:
```bash
cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip
cargo clippy --workspace --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip
```
Explanation:
* `-D warnings`: No warnings are allowed in the codebase.
* `-A clippy::type_complexity`: type complexity must be ignored because we use huge templates for queries.