lint fixes
Some checks failed
Continuous Integration / Code Formatting (pull_request) Successful in 27s
Continuous Integration / Code Quality Check (pull_request) Successful in 29s
Continuous Integration / Test Execution (pull_request) Failing after 33s
Continuous Integration / CI Summary (pull_request) Failing after 5s

This commit is contained in:
2025-09-28 19:16:20 +04:00
parent c1f3f9f708
commit eb99c6a18e
46 changed files with 2608 additions and 1304 deletions

232
run_dev.bat Normal file
View File

@@ -0,0 +1,232 @@
@echo off
setlocal enabledelayedexpansion
REM =============================================================================
REM Skelly Development Tools Runner
REM =============================================================================
REM
REM This script runs development tools for the Skelly Godot project.
REM By default, it runs all checks: linting, formatting, and testing.
REM
REM Usage:
REM run_dev.bat - Run all checks (lint + format + test)
REM run_dev.bat --lint - Run only linting
REM run_dev.bat --format - Run only formatting
REM run_dev.bat --test - Run only tests
REM run_dev.bat --help - Show this help message
REM run_dev.bat --steps lint test - Run specific steps in order
REM
REM =============================================================================
REM Initialize variables
set "ARG_LINT_ONLY="
set "ARG_FORMAT_ONLY="
set "ARG_TEST_ONLY="
set "ARG_HELP="
set "ARG_STEPS="
set "CUSTOM_STEPS="
REM Parse command line arguments
:parse_args
if "%~1"=="" goto :args_parsed
if /i "%~1"=="--lint" (
set "ARG_LINT_ONLY=1"
shift
goto :parse_args
)
if /i "%~1"=="--format" (
set "ARG_FORMAT_ONLY=1"
shift
goto :parse_args
)
if /i "%~1"=="--test" (
set "ARG_TEST_ONLY=1"
shift
goto :parse_args
)
if /i "%~1"=="--help" (
set "ARG_HELP=1"
shift
goto :parse_args
)
if /i "%~1"=="--steps" (
set "ARG_STEPS=1"
shift
REM Collect remaining arguments as custom steps
:collect_steps
if "%~1"=="" goto :args_parsed
if "!CUSTOM_STEPS!"=="" (
set "CUSTOM_STEPS=%~1"
) else (
set "CUSTOM_STEPS=!CUSTOM_STEPS! %~1"
)
shift
goto :collect_steps
)
REM Unknown argument
echo ❌ Unknown argument: %~1
echo Use --help for usage information
exit /b 1
:args_parsed
REM Show help if requested
if defined ARG_HELP (
echo.
echo 🔧 Skelly Development Tools Runner
echo.
echo Usage:
echo run_dev.bat - Run all checks ^(lint + format + test^)
echo run_dev.bat --lint - Run only linting
echo run_dev.bat --format - Run only formatting
echo run_dev.bat --test - Run only tests
echo run_dev.bat --help - Show this help message
echo run_dev.bat --steps lint test - Run specific steps in order
echo.
echo Available steps for --steps:
echo lint - Run GDScript linting ^(gdlint^)
echo format - Run GDScript formatting ^(gdformat^)
echo test - Run Godot tests
echo.
echo Examples:
echo run_dev.bat ^(runs lint, format, test^)
echo run_dev.bat --lint ^(runs only linting^)
echo run_dev.bat --steps format lint ^(runs format then lint^)
echo.
exit /b 0
)
echo ================================
echo 🚀 Development Tools Runner
echo ================================
echo.
REM Check if Python is available
python --version >nul 2>&1
if !errorlevel! neq 0 (
echo ❌ ERROR: Python is not installed or not in PATH
echo.
echo Installation instructions:
echo 1. Install Python: winget install Python.Python.3.13
echo 2. Restart your command prompt
echo 3. Run this script again
echo.
pause
exit /b 1
)
REM Check if pip is available
pip --version >nul 2>&1
if !errorlevel! neq 0 (
echo ❌ ERROR: pip is not installed or not in PATH
echo Please ensure Python was installed correctly with pip
pause
exit /b 1
)
REM Check if Godot is available (only if test step will be run)
set "NEED_GODOT="
if defined ARG_TEST_ONLY set "NEED_GODOT=1"
if defined ARG_STEPS (
echo !CUSTOM_STEPS! | findstr /i "test" >nul && set "NEED_GODOT=1"
)
if not defined ARG_LINT_ONLY if not defined ARG_FORMAT_ONLY if not defined ARG_STEPS set "NEED_GODOT=1"
if defined NEED_GODOT (
godot --version >nul 2>&1
if !errorlevel! neq 0 (
echo ❌ ERROR: Godot is not installed or not in PATH
echo.
echo Installation instructions:
echo 1. Download Godot from https://godotengine.org/download
echo 2. Add Godot executable to your PATH environment variable
echo 3. Or place godot.exe in this project directory
echo 4. Restart your command prompt
echo 5. Run this script again
echo.
pause
exit /b 1
)
)
REM Check if gdlint and gdformat are available (only if needed)
set "NEED_GDTOOLS="
if defined ARG_LINT_ONLY set "NEED_GDTOOLS=1"
if defined ARG_FORMAT_ONLY set "NEED_GDTOOLS=1"
if defined ARG_STEPS (
echo !CUSTOM_STEPS! | findstr /i /c:"lint" >nul && set "NEED_GDTOOLS=1"
echo !CUSTOM_STEPS! | findstr /i /c:"format" >nul && set "NEED_GDTOOLS=1"
)
if not defined ARG_TEST_ONLY if not defined ARG_STEPS set "NEED_GDTOOLS=1"
if defined NEED_GDTOOLS (
gdlint --version >nul 2>&1
if !errorlevel! neq 0 (
echo ❌ ERROR: gdlint is not installed or not in PATH
echo.
echo Installation instructions:
echo 1. pip install --upgrade "setuptools<81"
echo 2. pip install gdtoolkit==4
echo 3. Restart your command prompt
echo 4. Run this script again
echo.
pause
exit /b 1
)
gdformat --version >nul 2>&1
if !errorlevel! neq 0 (
echo ❌ ERROR: gdformat is not installed or not in PATH
echo.
echo Installation instructions:
echo 1. pip install --upgrade "setuptools<81"
echo 2. pip install gdtoolkit==4
echo 3. Restart your command prompt
echo 4. Run this script again
echo.
pause
exit /b 1
)
)
echo ✅ All dependencies are available. Running development workflow...
echo.
REM Build Python command based on arguments
set "PYTHON_CMD=python tools\run_development.py"
if defined ARG_LINT_ONLY (
set "PYTHON_CMD=!PYTHON_CMD! --lint"
echo 🔍 Running linting only...
) else if defined ARG_FORMAT_ONLY (
set "PYTHON_CMD=!PYTHON_CMD! --format"
echo 🎨 Running formatting only...
) else if defined ARG_TEST_ONLY (
set "PYTHON_CMD=!PYTHON_CMD! --test"
echo 🧪 Running tests only...
) else if defined ARG_STEPS (
set "PYTHON_CMD=!PYTHON_CMD! --steps !CUSTOM_STEPS!"
echo 🔄 Running custom workflow: !CUSTOM_STEPS!...
) else (
echo 🚀 Running complete development workflow: format + lint + test...
)
echo.
REM Run the Python development workflow script
!PYTHON_CMD!
REM Capture exit code and display result
set WORKFLOW_RESULT=!errorlevel!
echo.
if !WORKFLOW_RESULT! equ 0 (
echo 🎉 Development workflow completed successfully!
) else (
echo ⚠️ Development workflow completed with issues.
echo Please review the output above and fix any problems.
)
echo.
pause
exit /b !WORKFLOW_RESULT!