mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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:
parent
ed36c21e7e
commit
60f286d56d
1 changed files with 8 additions and 6 deletions
|
@ -1,21 +1,23 @@
|
||||||
# Linters in this Repository
|
# 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
|
```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
|
```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.
|
* `-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.
|
* `-A clippy::type_complexity`: type complexity must be ignored because we use huge templates for queries.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue