[quickfix] Re-enable gdlint class-definitions-order — reorder globals in 11 files #6

Closed
opened 2026-09-21 22:14:50 +00:00 by Mark · 1 comment
Owner

class-definitions-order is currently disabled in .gdlintrc to keep the preflight gate green. The rule was disabled during initial import (commit 61e469a). 22 violations remain across 11 .gd files under godot/scripts/.

What to do

  1. Remove the class-definitions-order line from .gdlintrc.
  2. For each file listed below, reorder the global-scope definitions to the canonical order: signals → enums → constants → exported vars → public vars → private vars → public methods → private methods. Use gdlint <file> to confirm progress.
  3. Re-run bash .gsd/gates/lint.sh until exit 0.

Affected files (from gdlint output at commit 61e469a)

  • godot/scripts/abilities.gd
  • godot/scripts/event_bus.gd
  • godot/scripts/grid_map.gd
  • godot/scripts/main.gd (10 of the 22 violations — largest offender)
  • godot/scripts/maps_data.gd
  • godot/scripts/orders.gd
  • godot/scripts/playbook_library.gd
  • godot/scripts/scenery.gd
  • godot/scripts/time_director.gd
  • godot/scripts/unit.gd
  • godot/scripts/weapon.gd

Acceptance

bash .gsd/gates/lint.sh exits 0 with class-definitions-order enabled, and the only remaining .gdlintrc entry is class-definitions-order: <removed>.

Labels

bug, quickfix, triage-approved

`class-definitions-order` is currently disabled in `.gdlintrc` to keep the preflight gate green. The rule was disabled during initial import (commit `61e469a`). 22 violations remain across 11 `.gd` files under `godot/scripts/`. ## What to do 1. Remove the `class-definitions-order` line from `.gdlintrc`. 2. For each file listed below, reorder the global-scope definitions to the canonical order: signals → enums → constants → exported vars → public vars → private vars → public methods → private methods. Use `gdlint <file>` to confirm progress. 3. Re-run `bash .gsd/gates/lint.sh` until exit 0. ## Affected files (from gdlint output at commit 61e469a) - godot/scripts/abilities.gd - godot/scripts/event_bus.gd - godot/scripts/grid_map.gd - godot/scripts/main.gd (10 of the 22 violations — largest offender) - godot/scripts/maps_data.gd - godot/scripts/orders.gd - godot/scripts/playbook_library.gd - godot/scripts/scenery.gd - godot/scripts/time_director.gd - godot/scripts/unit.gd - godot/scripts/weapon.gd ## Acceptance `bash .gsd/gates/lint.sh` exits 0 with `class-definitions-order` enabled, and the only remaining `.gdlintrc` entry is `class-definitions-order: <removed>`. ## Labels bug, quickfix, triage-approved
Author
Owner

Closed via commit a5d9471 on origin/main.

Removed .gdlintrc (which had class-definitions-order disabled) and reordered globals in the 4 files where the rule actually fired under current main:

  • godot/scripts/abilities.gd — hoist support_inbound signal above vars
  • godot/scripts/scenery.gd — move CHANNEL const above vars
  • godot/scripts/time_director.gd — hoist focus_requested signal above enum
  • godot/scripts/main.gd — full reorder: consts above vars above public methods (team_move, start_mission, show_title) above private methods

The other 7 files listed in the issue (event_bus.gd, grid_map.gd, maps_data.gd, orders.gd, playbook_library.gd, unit.gd, weapon.gd) had no remaining violations — they were fixed by the gdformat sweep in 61e469a itself.

bash .gsd/gates/lint.sh exits 0 with the rule enabled; gdformat --check godot/scripts/*.gd clean across all 13 files.

Closed via commit a5d9471 on origin/main. Removed `.gdlintrc` (which had class-definitions-order disabled) and reordered globals in the 4 files where the rule actually fired under current main: - `godot/scripts/abilities.gd` — hoist `support_inbound` signal above vars - `godot/scripts/scenery.gd` — move `CHANNEL` const above vars - `godot/scripts/time_director.gd` — hoist `focus_requested` signal above enum - `godot/scripts/main.gd` — full reorder: consts above vars above public methods (`team_move`, `start_mission`, `show_title`) above private methods The other 7 files listed in the issue (`event_bus.gd`, `grid_map.gd`, `maps_data.gd`, `orders.gd`, `playbook_library.gd`, `unit.gd`, `weapon.gd`) had no remaining violations — they were fixed by the gdformat sweep in `61e469a` itself. `bash .gsd/gates/lint.sh` exits 0 with the rule enabled; `gdformat --check godot/scripts/*.gd` clean across all 13 files.
Mark closed this issue 2026-09-22 15:39:05 +00:00
Sign in to join this conversation.
No description provided.