xtask: check documented switches are read #3539
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3539
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3539"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@tharun-37 on GitHub · 2026-11-27 15:39 UTC · original
tharun-37:xtask/switch-docs-check→main· +336 −6 · 5 files · 1 commits · openAdds
cargo xtask check-switchesand runs it from the pre-commit hook after the asset-policy check.The checker extracts concrete
VICTORY_*names fromREADME.mdanddocs/**/*.md, then verifies each is passed to an environment read in Rust source (var,var_os,switch::on,env!, and the existingenv_path/numbershelpers). Comments and writes such asset_varor.env(...)do not count. Wildcards and lowercase names are ignored, and duplicate doc mentions yield one diagnostic.The current tree passes with 29 documented names. Six synthetic tests cover direct reads, helpers, comments, writes, similar names, duplicate mentions, and line-number reporting. No game data, generated files, shader names or hashes are involved.
Verification:
cargo test -p xtask: 13 passed, 0 failed.cargo xtask check-switches: 29 names ok.cargo clippy --workspace --all-targets --locked -- -D warningspasses.cargo xtask policy: 192 files ok.victory-gpufailures.Claim: #1633
AI-assisted (OpenCode).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.