Compile the upstream Quirrel checker with MSVC and invoke syntax and static analysis for each input file. Treat reported errors and warnings as failures because the checker can return a zero exit code for them. Split the command line by purpose and add GUI pack construction from declared edits and injected scripts. Verify the checker against stock scripts and invalid inputs, and confirm that patch checks still run.
25 lines
895 B
Python
25 lines
895 B
Python
"""Command line entry point for the development-side tools.
|
|
|
|
Each group of commands lives in its own module and registers itself here:
|
|
- exe_commands: check-patches, patch-exe
|
|
- build_commands: build-gui
|
|
- script_commands: build-script-checker, check-scripts
|
|
|
|
Run `wtotools <command> --help` for the arguments of one command.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
|
|
from . import build_commands, exe_commands, script_commands
|
|
|
|
|
|
def main(argv: list[str] | None = None) -> int:
|
|
parser = argparse.ArgumentParser(prog="wtotools", description=__doc__,
|
|
formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
commands = parser.add_subparsers(dest="command", required=True)
|
|
for group in (exe_commands, build_commands, script_commands):
|
|
group.register(commands)
|
|
args = parser.parse_args(argv)
|
|
return args.handler(args)
|