mirror of
https://github.com/bevyengine/bevy
synced 2025-01-23 02:15:15 +00:00
130953c717
# Objective CI should check for missing backticks in doc comments. Fixes #3435 ## Solution `clippy` has a lint for this: `doc_markdown`. This enables that lint in the CI script. Of course, enabling this lint in CI causes a bunch of lint errors, so I've gone through and fixed all of them. This was a huge edit that touched a ton of files, so I split the PR up by crate. When all of the following are merged, the CI should pass and this can be merged. + [x] #3467 + [x] #3468 + [x] #3470 + [x] #3469 + [x] #3471 + [x] #3472 + [x] #3473 + [x] #3474 + [x] #3475 + [x] #3476 + [x] #3477 + [x] #3478 + [x] #3479 + [x] #3480 + [x] #3481 + [x] #3482 + [x] #3483 + [x] #3484 + [x] #3485 + [x] #3486
29 lines
1.2 KiB
Rust
29 lines
1.2 KiB
Rust
use xshell::{cmd, pushd};
|
|
|
|
fn main() {
|
|
// When run locally, results may differ from actual CI runs triggered by
|
|
// .github/workflows/ci.yml
|
|
// - Official CI runs latest stable
|
|
// - Local runs use whatever the default Rust is locally
|
|
|
|
// See if any code needs to be formatted
|
|
cmd!("cargo fmt --all -- --check")
|
|
.run()
|
|
.expect("Please run 'cargo fmt --all' to format your code.");
|
|
|
|
// See if clippy has any complaints.
|
|
// - Type complexity must be ignored because we use huge templates for queries
|
|
cmd!("cargo clippy --workspace --all-targets --all-features -- -D warnings -A clippy::type_complexity -W clippy::doc_markdown")
|
|
.run()
|
|
.expect("Please fix clippy errors in output above.");
|
|
|
|
// Run UI tests (they do not get executed with the workspace tests)
|
|
// - See crates/bevy_ecs_compile_fail_tests/README.md
|
|
{
|
|
let _bevy_ecs_compile_fail_tests = pushd("crates/bevy_ecs_compile_fail_tests")
|
|
.expect("Failed to navigate to the 'bevy_ecs_compile_fail_tests' crate");
|
|
cmd!("cargo test")
|
|
.run()
|
|
.expect("Compiler errors of the ECS compile fail tests seem to be different than expected! Check locally and compare rust versions.");
|
|
}
|
|
}
|