AeThex-Engine-Core/engine/misc/scripts/validate_xml.py
MrPiglr 9dddce666d
🚀 AeThex Engine v1.0 - Complete Fork
- Forked from Godot Engine 4.7-dev (MIT License)
- Rebranded to AeThex Engine with cyan/purple theme
- Added AI-powered development assistant module
- Integrated Claude API for code completion & error fixing
- Custom hexagon logo and branding
- Multi-platform CI/CD (Windows, Linux, macOS)
- Built Linux editor binary (151MB)
- Complete source code with all customizations

Tech Stack:
- C++ game engine core
- AI Module: Claude 3.5 Sonnet integration
- Build: SCons, 14K+ source files
- License: MIT (Godot) + Custom (AeThex features)

Ready for Windows build via GitHub Actions!
2026-02-23 05:01:56 +00:00

44 lines
1.1 KiB
Python
Executable file

#!/usr/bin/env python3
if __name__ != "__main__":
raise SystemExit(f'Utility script "{__file__}" should not be used as a module!')
import argparse
import sys
import xmlschema # Third-party module. Automatically installed in associated pre-commit hook.
sys.path.insert(0, "./")
try:
from methods import print_error
except ImportError:
raise SystemExit(f"Utility script {__file__} must be run from repository root!")
def main():
parser = argparse.ArgumentParser(description="Validate XML documents against `doc/class.xsd`")
parser.add_argument("files", nargs="+", help="A list of XML files to parse")
args = parser.parse_args()
SCHEMA = xmlschema.XMLSchema("doc/class.xsd")
ret = 0
for file in args.files:
try:
SCHEMA.validate(file)
except xmlschema.validators.exceptions.XMLSchemaValidationError as err:
print_error(f'Validation failed for "{file}"!\n\n{err}')
ret += 1
return ret
try:
raise SystemExit(main())
except KeyboardInterrupt:
import os
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
os.kill(os.getpid(), signal.SIGINT)