Skip to content

Repository checks

Changing. Follow: #524, #1182, #1183

Use this reference to look up which checks an xtask trigger runs and what each check requires. Build and test explains how to run the checks and what CI runs on a pull request.

Each trigger runs a fixed set of checks. Run scripts/hooks/run-checks with no argument to see all triggers.

Trigger Checks
commit comments, parity, fmt
push comments, parity, fmt, ecs-lint
lint comments, parity, fmt, keys, crate-map, ecs-lint
clippy clippy
test The tests of changed crates and their dependents, plus doctests when core, resource or voxel is selected.
portability no-bevy, layers, example-dependencies, wasm32, no-std

fmt checks formatting with rustfmt for the changed files on edit, the staged contents on commit, and Cargo for the whole workspace on other triggers. clippy checks all workspace targets twice: once with the default features and once with mcrs_minecraft_client/dev. The client does not enable dev by default. The other checks are specific to mcrs, and the package lists they use are in xtask/src/checks.rs.

Check What it requires
comments No comments in checked source and config files outside examples/, except // SAFETY: notes around Rust unsafe code. Files on the generated-file exemption list are skipped. cargo run -p xtask -- strip-comments removes prohibited comments.
parity Tests in parity files must load game fixtures; literal expectations fail the check. Vanilla claims against literals outside parity files give warnings when they load no fixture. Specs and parity explains parity tests.
crate-map docs/crates.md must match the descriptions in all manifests under crates/. This is the package map to read before adding a helper or a type.
ecs-lint Build the rustc driver in lints/, check its fixture, then check all workspace targets with warnings denied and the driver selected explicitly.
keys When generator inputs or outputs change, the generated registry key sources must match what the generator writes from the stored reports. Never edit a generated file by hand.
no-bevy 147 packages must build without Bevy.
no-std 22 packages must build for a target without std.
wasm32 11 packages must build for wasm32.
example-dependencies Each package under examples/ obeys its normal dependency policy in examples/dependencies.json. A failure shows the dependency path.
layers The wire and network crates must not link game data, so a proxy or a bot can use them alone. The model bake, item icon and entity renderer crates must not link the network, a client or a server, so a viewer works with no connection. The play-state packet crate must not link inventory layout or rules. The inventory gameplay crate must not depend on the packet edge. The inventory crates that a client uses (mcrs_minecraft_engine_item, mcrs_minecraft_player_holders and mcrs_minecraft_inventory_client) must not link a crate of the server.

The Cargo workspace wrapper in .cargo/config.toml uses the built ECS lint driver for workspace crates during cargo check, builds and tests. If the driver is absent, or its toolchain differs, it falls back to rustc. Clippy uses its own wrapper, so ecs-lint runs a separate check.

The driver checks system access, run conditions, blocking calls and allocation paths. It follows calls into dependencies with lint facts, but does not yet follow calls into crates without Bevy, where the kernels live.1 An alloc_in_tick expectation must state its site count with mcrs::alloc_sites(N); a changed count fails. Tracked local collections that grow and macro allocation sites count too. Project run conditions that fire on events or pending work use mcrs::event_condition. Setup, rule definitions and limits are in the ECS lint guide.

Next: Clean-room in practice.

  1. WIP#1183 Tracks the ECS lint following calls into crates without Bevy. ↩

Sources and verification

Verified: 26.4-snapshot-7, 1cf84286c, 2026-11-30

Related open issues:

  • #524 WIP Remove the names of the game's code from comments outside world generation
  • #1182 WIP Lint facts go stale when the lint driver changes
  • #1183 WIP ecs-lint does not follow calls into crates without Bevy