|
| 1 | +# Engineering System checks |
| 2 | + |
| 3 | +These checks run in addition to logic tests. |
| 4 | + |
| 5 | +## Standard checks |
| 6 | + |
| 7 | +The Engineering System provides a set of [standard checks](https://dev.azure.com/azure-sdk/internal/_wiki/wikis/internal.wiki/1215/Source-and-Artifact-scans-and-checks). |
| 8 | + |
| 9 | +## Rust-specific checks |
| 10 | + |
| 11 | +### Checks included in `cargo` |
| 12 | + |
| 13 | +The following checks are included in the Rust toolchain or are part of cargo. |
| 14 | + |
| 15 | +#### Audit |
| 16 | + |
| 17 | +Documentation: [cargo-audit](https://github.com/rustsec/rustsec/tree/main/cargo-audit) |
| 18 | + |
| 19 | +Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1) |
| 20 | + |
| 21 | +``` |
| 22 | +cargo audit |
| 23 | +``` |
| 24 | + |
| 25 | +#### Fmt |
| 26 | + |
| 27 | +Documentation: [cargo-fmt](https://doc.rust-lang.org/cargo/commands/cargo-fmt.html) |
| 28 | + |
| 29 | +Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1) |
| 30 | + |
| 31 | +``` |
| 32 | +cargo fmt |
| 33 | +``` |
| 34 | + |
| 35 | +#### Clippy |
| 36 | + |
| 37 | +Documentation: [cargo-clippy](https://doc.rust-lang.org/cargo/commands/cargo-clippy.html) |
| 38 | + |
| 39 | +Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1) |
| 40 | + |
| 41 | +``` |
| 42 | +cargo clippy |
| 43 | +``` |
| 44 | + |
| 45 | +#### Check |
| 46 | + |
| 47 | +> [!NOTE] |
| 48 | +> This only runs against `azure-core` and not against other packages in the build |
| 49 | +
|
| 50 | +Documentation: [cargo-check](https://doc.rust-lang.org/cargo/commands/cargo-check.html) |
| 51 | + |
| 52 | +Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1) |
| 53 | + |
| 54 | +``` |
| 55 | +cargo check |
| 56 | +``` |
| 57 | + |
| 58 | +#### Doc |
| 59 | + |
| 60 | +Documentation: [cargo-doc](https://doc.rust-lang.org/cargo/commands/cargo-doc.html) |
| 61 | + |
| 62 | +Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1) |
| 63 | + |
| 64 | +``` |
| 65 | +cargo doc |
| 66 | +``` |
| 67 | + |
| 68 | +#### Docs-rs |
| 69 | + |
| 70 | +Documentation: [cargo-docs-rs](https://github.com/dtolnay/cargo-docs-rs) |
| 71 | + |
| 72 | +Runs in: [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1) |
| 73 | + |
| 74 | +``` |
| 75 | +cargo install --locked cargo-docs-rs |
| 76 | +cargo +nightly docs-rs |
| 77 | +``` |
| 78 | + |
| 79 | +### Checks installed as tools |
| 80 | + |
| 81 | +Additional checks can be installed as tools by `cargo install` and run in relevant parts of the build system. |
| 82 | + |
| 83 | +### Deny |
| 84 | + |
| 85 | +Documentation: [cargo-deny](https://github.com/EmbarkStudios/cargo-deny) |
| 86 | + |
| 87 | +Runs in [Analyze-Code.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Analyze-Code.ps1) |
| 88 | + |
| 89 | +``` |
| 90 | +cargo install cargo-deny |
| 91 | +cargo deny |
| 92 | +``` |
| 93 | + |
| 94 | +### Semver |
| 95 | + |
| 96 | +Documentation: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) |
| 97 | + |
| 98 | +Runs in [Test-Semver.ps1](https://github.com/Azure/azure-sdk-for-rust/blob/main/eng/scripts/Test-Semver.ps1) |
| 99 | + |
| 100 | +``` |
| 101 | +cargo install cargo-semver-checks |
| 102 | +cargo semver-checks |
| 103 | +``` |
0 commit comments