Validate Weapon field values - #55
Merged
Merged
Conversation
|
| Filename | Overview |
|---|---|
| crates/analysis/tests/spec/WeaponValues.ini | Adds valid and invalid Weapon samples covering references, masks, booleans, shot delays, and bonus tuples. |
| crates/analysis/tests/spec/WeaponValues.spec.toml | Adds expected diagnostics for the new Weapon validation cases. |
| crates/schema/schema.json | Replaces lenient Weapon field types with concrete reference, enum, flag, bool, one_of, and token_list schemas and adds missing value sets. |
| crates/schema/src/lib.rs | Adds a schema regression test ensuring every Weapon field has a concrete value type. |
Reviews (2): Last reviewed commit: "Avoid invalid laser bone validation" | Re-trigger Greptile
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Weaponfield a concrete schema value typeWeaponfields from regressing tounknownRoot cause
The hand-written Weapon schema retained lenient
unknownor generic string mappings for custom parsers and bit masks, so malformed values were accepted without diagnostics.Impact
Weapon INI values now receive enum, flag, boolean, numeric, percentage, reference, and structured-token validation matching the engine parse table. All 76 current Weapon fields have concrete value types.
Validation
cargo fmt --checkcargo test