A player-clippy gate lints the shipped player build (#1471)

No gate built the shipped player graph outside tests. The player-tests gate compiles with `cfg(test)`, and clippy ran only on the dev feature set, so the player build's own warnings landed unseen: four unused re-exports that only dev probes used.

A new `player-clippy` gate runs `cargo clippy -p benilla -p benilla-app --no-default-features -- -D warnings` in `scripts/gates.sh`, in CI, and in `scripts/check.sh` when it reaches those crates. `docs/METHOD.md` names it.

The four re-exports are deleted: `ground_derived`, `GroundClamped`, `BodyPartsDesc` and `ATTACH_SLOT_NAMES`. Their dev users import them from the defining modules, with no `allow` left.

Test: an unused import added to `net.rs` fails the new gate.

Fixes #1465

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sam Sung
2026-10-16 20:03:00 +07:00
committed by GitHub
parent 5d577c277c
commit c50db9bfc0
12 changed files with 37 additions and 29 deletions
+4
View File
@@ -112,6 +112,10 @@ run() {
run fmt cargo fmt --all -- --check
run clippy cargo clippy $pflags --all-targets -- -D warnings
# The player build (no `dev` feature) is linted on its own: the run above sees only the dev set.
case " $pkgs " in *" benilla-app "* | *" benilla "*)
run player-clippy cargo clippy -p benilla -p benilla-app --no-default-features -- -D warnings ;;
esac
# --no-fail-fast: one red test binary does not hide the failures in the ones after it.
run test env BENILLA_SKIP_LOG="$skips" cargo test --no-fail-fast $pflags
# Data-gated tests skip without the install or the addon corpus and libtest swallows their line,
+9 -3
View File
@@ -2,9 +2,9 @@
# The land gate chain: every gate in order, stopping at the first failure.
#
# fmt, clippy, reference, test, test-no-install, vm-parity, doc-links, message-catalog,
# pass-span-lint, player-tests, enforcer, enforcer-no-install. A failure prints the gate's log tail
# and exits nonzero; a green run stamps the tree, which then re-greens without running.
# GATES_FORCE=1 runs the chain anyway,
# pass-span-lint, player-clippy, player-tests, enforcer, enforcer-no-install. A failure prints the
# gate's log tail and exits nonzero; a green run stamps the tree, which then re-greens without
# running. GATES_FORCE=1 runs the chain anyway,
# WOW_DATA picks the install (set and empty: none) and TMPDIR holds the scratch files; the script
# sets BENILLA_REQUIRE_DATA, BENILLA_ADDON_CORPUS, BENILLA_SKIP_LOG and WOW_WORLDVIEW_CHECK for
# its gates. BENILLA_RE names the benilla-re checkout the reference gate compares `reference/` with.
@@ -170,6 +170,12 @@ run message-catalog scripts/gen-message-catalog.py --check
# wgpu validation error on Vulkan and a silent no-op on Metal and DX12, which no macOS run sees.
run pass-span-lint scripts/pass-span-lint.py
# player-clippy: the player build's own lints, which no other gate sees. `clippy` runs the dev
# feature set and player-tests compiles under `cfg(test)`, where test code uses imports and items
# the shipped library does not; this lints the shipped library and the launcher, with no
# `--all-targets`, so a warning confined to the player graph fails here.
run player-clippy cargo clippy -p benilla -p benilla-app --no-default-features -- -D warnings
# player-tests: the player build, `benilla-app` without `dev`, which compiles out the debug panel,
# perf HUD, inspector, capture harness and probes, so it fails when any other code names one of
# them. Its test build compiles every line of the player graph but the `benilla` launcher, a shim