Skip to content

Allow running in strict mode #64

@S-S-X

Description

@S-S-X

Allow setting strict mode in configuration file.

When strict mode is enabled it should throw errors to fail tests immediately if:

  • Deprecated engine functions are used.
    • Example: ItemStack:get_metadata() (method is deprecated)
    • Most functions already do this because there's no implementation for most deprecated functions.
  • Engine API function call would return error.
    • Example: InvRef:set_size("main", -1) (function returns false to indicate error)
  • Values or types that can be converted are supplied
    • Example: InvRef:set_size("main", "1") (string instead of number)
    • Example: InvRef:set_size("main", 1.2) (floating point truncated)

Possibly could also allow types for strict mode, something like:
strict = types,deprecated to throw error for type conversions and deprecated calls.
strict = all to throw error on anything not considered accurate or completely valid.

Also link to #5

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestin-latest-dockerIncluded with latest docker images, might not yet be available elsewhere

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions