Files
gamedev-the-steward/tools/fix_format.sh
T
admin 28a2e42c41 feat: add local quality gate scripts and documentation
Add quality.sh (bash), quality.ps1 (PowerShell), and fix_format.sh
for automated GDScript quality checking. Includes:
- gdformat --check (formatting gate)
- gdlint (lint rules)
- godot --headless project validation (with 30s timeout)
- Optional GUT test support
- --changed mode for checking only modified .gd files
- Compact summary output with NEXT FIX suggestions
- Full logs saved to logs/quality/latest/

Add docs/local_quality_gate.md with setup and usage instructions.
2026-07-05 23:06:18 +02:00

25 lines
549 B
Bash

#!/usr/bin/env bash
# fix_format.sh — Auto-format all GDScript files with gdformat.
# Usage: ./tools/fix_format.sh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
# detect gdformat
FMT=""
if command -v gdformat &>/dev/null; then
FMT="gdformat"
elif python -m gdtoolkit.formatter --help &>/dev/null 2>&1; then
FMT="python -m gdtoolkit.formatter"
fi
if [[ -z "$FMT" ]]; then
echo "ERROR: gdformat not found. Install: pip install gdtoolkit"
exit 1
fi
echo "Formatting all .gd files in $ROOT ..."
$FMT .
echo "Done."