chore: bootstrap Godot quality tools
This commit is contained in:
+4
-2
@@ -54,12 +54,14 @@ find_godot() {
|
||||
}
|
||||
|
||||
find_gdformat() {
|
||||
if [[ -x "$ROOT/.venv/bin/gdformat" ]]; then echo "$ROOT/.venv/bin/gdformat"; return 0; fi
|
||||
if command -v gdformat &>/dev/null; then echo "gdformat"; return 0; fi
|
||||
if python -m gdtoolkit.formatter --help &>/dev/null 2>&1; then echo "python -m gdtoolkit.formatter"; return 0; fi
|
||||
return 1
|
||||
}
|
||||
|
||||
find_gdlint() {
|
||||
if [[ -x "$ROOT/.venv/bin/gdlint" ]]; then echo "$ROOT/.venv/bin/gdlint"; return 0; fi
|
||||
if command -v gdlint &>/dev/null; then echo "gdlint"; return 0; fi
|
||||
if python -m gdtoolkit.linter --help &>/dev/null 2>&1; then echo "python -m gdtoolkit.linter"; return 0; fi
|
||||
return 1
|
||||
@@ -99,7 +101,7 @@ fmt_result="PASS"
|
||||
: > "$LOG/gdformat.log"
|
||||
if [[ -z "$fmt_tool" ]]; then
|
||||
fmt_result="SKIPPED"
|
||||
echo "gdformat not found — install: pip install gdtoolkit" > "$LOG/gdformat.log"
|
||||
echo "gdformat not found — install requirements-dev.txt (see docs/local_quality_gate.md)" > "$LOG/gdformat.log"
|
||||
else
|
||||
if $CHANGED; then
|
||||
files=$(changed_gd)
|
||||
@@ -137,7 +139,7 @@ lint_result="PASS"
|
||||
: > "$LOG/gdlint.log"
|
||||
if [[ -z "$lint_tool" ]]; then
|
||||
lint_result="SKIPPED"
|
||||
echo "gdlint not found — install: pip install gdtoolkit" > "$LOG/gdlint.log"
|
||||
echo "gdlint not found — install requirements-dev.txt (see docs/local_quality_gate.md)" > "$LOG/gdlint.log"
|
||||
else
|
||||
if $CHANGED; then
|
||||
files=$(changed_gd)
|
||||
|
||||
Reference in New Issue
Block a user