Add gdlint and gdformat scripts

This commit is contained in:
2025-09-27 20:40:13 +04:00
parent 86439abea8
commit 06f0f87970
40 changed files with 2314 additions and 732 deletions

View File

@@ -4,12 +4,14 @@ extends SceneTree
# This script validates all log levels, filtering, and formatting functionality
# Usage: Add to scene or autoload temporarily to run tests
func _initialize():
# Wait a frame for debug_manager to initialize
await process_frame
test_logging_system()
quit()
func test_logging_system():
print("=== Starting Logging System Tests ===")
@@ -30,6 +32,7 @@ func test_logging_system():
print("=== Logging System Tests Complete ===")
func test_basic_logging(debug_manager):
print("\n--- Test 1: Basic Log Level Functionality ---")
@@ -43,6 +46,7 @@ func test_basic_logging(debug_manager):
debug_manager.log_error("ERROR: This error should appear")
debug_manager.log_fatal("FATAL: This fatal error should appear")
func test_log_level_filtering(debug_manager):
print("\n--- Test 2: Log Level Filtering ---")
@@ -64,6 +68,7 @@ func test_log_level_filtering(debug_manager):
# Reset to INFO for remaining tests
debug_manager.set_log_level(debug_manager.LogLevel.INFO)
func test_category_logging(debug_manager):
print("\n--- Test 3: Category Functionality ---")
@@ -73,6 +78,7 @@ func test_category_logging(debug_manager):
debug_manager.log_warn("Warning with VALIDATION category", "VALIDATION")
debug_manager.log_error("Error with SYSTEM category", "SYSTEM")
func test_debug_mode_integration(debug_manager):
print("\n--- Test 4: Debug Mode Integration ---")
@@ -99,6 +105,7 @@ func test_debug_mode_integration(debug_manager):
debug_manager.set_debug_enabled(original_debug_state)
debug_manager.set_log_level(debug_manager.LogLevel.INFO)
# Helper function to validate log level enum values
func test_log_level_enum(debug_manager):
print("\n--- Log Level Enum Values ---")