-
Notifications
You must be signed in to change notification settings - Fork 1
Description
A list of cases that will be covered by the new script checker in the works, i.e. mistakes that will not be caught by loading the script (and the utility scripts) and calling its .initial_effect function. Test files for each case (or subcase) will be added as a task, and will be marked finished once that file is correctly handled.
Errors
Non-existent functions
Should error when trying to call a function that is not defined.
- nonexistent-function-1.lua
Mismatched arguments
Should error when the type of the argument(s) being passed to a function doesn't match its parameters.
- argument-type-mismatch-1.lua
Condition function signature inference
Infer the signature of a condition function based on what was passed to the corresponding SetType call in its parent Effect, and check the types in the function body against the inferred types.
- condition-function-signature-inference.lua
Filter function signature inference
Infer the signature of a filter function based on what was passed as extra arguments to the function that used that filter (e.g. Duel.IsExistingMatchingCard), and check the types in the function body against the inferred types.
- filter-function-signature-inference.lua
Pseudo-enums
When calling certain functions, allow only certain constants (or combination of those constants) to be passed (e.g. allow only LOCATION_ constants for SetRange, and only CATEGORY_ constants for SetCategory). Magic numbers should be disallowed as well.
Global constant reassignment
Should error when a global constant is being assigned a new value.