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.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/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."
|
||||
Reference in New Issue
Block a user