Add gdlint job + gdlintrc to Gitea CI

Lints scripts/, db/, scenes/ via gdtoolkit==4.* on ubuntu-latest
(Python, no Godot needed), in parallel with the validate job.
addons/ (third-party LOD plugin) and developers/ (sandbox) are
left out. Non-blocking for now: the export jobs still only need
validate, so a lint regression won't break builds while the
Godot-3 leftover code is being cleaned up.

gdlintrc bumps max-line-length from 100 to 140 because Godot
$-style node paths and typed signatures routinely push past 100
without that being a real readability problem.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vaillant Jeremy
2026-05-17 14:48:13 +02:00
parent 410c135870
commit e883d662f2
3 changed files with 46 additions and 2 deletions
+23 -2
View File
@@ -43,7 +43,28 @@ jobs:
retention-days: 1
# ---------------------------------------------------------------------------
# 2. Desktop exports (Windows / Linux / macOS) — runs in parallel.
# 2. Static analysis — gdlint from Scony's gdtoolkit (Python, no Godot).
# Runs in parallel with `validate`. Exports do NOT depend on this job,
# so a lint failure does not block builds while the Godot-3 leftovers
# are still being cleaned up. Once the tree is clean, add this job to
# the `needs:` of the export jobs to make it a hard gate.
# ---------------------------------------------------------------------------
lint:
name: Lint GDScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install gdtoolkit
run: |
python3 -m pip install --user "gdtoolkit==4.*"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run gdlint
run: gdlint scripts db scenes
# ---------------------------------------------------------------------------
# 3. Desktop exports (Windows / Linux / macOS) — runs in parallel.
# macOS preset must be added in the Godot editor before this matrix entry
# can succeed (export_presets.cfg currently has none).
# ---------------------------------------------------------------------------
@@ -93,7 +114,7 @@ jobs:
retention-days: 14
# ---------------------------------------------------------------------------
# 3. Android export — needs JDK + Android SDK on top of the Godot image.
# 4. Android export — needs JDK + Android SDK on top of the Godot image.
# Provide ANDROID_KEYSTORE_BASE64 as a Gitea secret for a stable signature;
# otherwise a fresh debug keystore is generated on each run.
# ---------------------------------------------------------------------------