Tested on gdscript-formatter 0.21.0 (Pre-release 0.21.0-beta, published 2026-07-12), Linux x86_64. Upstream main checked up to 248fa13b (2026-07-12 09:20 UTC) — no fix commit found.
Appears to be a regression of the previously-fixed issue #133 "Reorder mode drops the @abstract script annotation" (closed COMPLETED 2025-10-16). The exact scenario reproduces again on 0.21.0-beta.
Impact (critical — silent semantic change)
Before formatting, SomeClass.new() is illegal (script is @abstract). After --reorder-code the file is empty, so SomeClass.new() becomes legal and produces an incomplete instance. No parse error, no warning — the class becomes a plain RefCounted. Any codebase using the "abstract base only, subclasses live in other files" pattern silently loses its abstract guard.
Repro
Entire .gd file:
Command:
gdscript-formatter --stdout --reorder-code bug.gd
Actual output with --reorder-code
Actual output without --reorder-code
Expected
@abstract preserved in both modes (same as the non---reorder-code behaviour).
Tested on
gdscript-formatter 0.21.0(Pre-release0.21.0-beta, published 2026-07-12), Linux x86_64. Upstreammainchecked up to248fa13b(2026-07-12 09:20 UTC) — no fix commit found.Appears to be a regression of the previously-fixed issue #133 "Reorder mode drops the @abstract script annotation" (closed COMPLETED 2025-10-16). The exact scenario reproduces again on 0.21.0-beta.
Impact (critical — silent semantic change)
Before formatting,
SomeClass.new()is illegal (script is@abstract). After--reorder-codethe file is empty, soSomeClass.new()becomes legal and produces an incomplete instance. No parse error, no warning — the class becomes a plainRefCounted. Any codebase using the "abstract base only, subclasses live in other files" pattern silently loses its abstract guard.Repro
Entire
.gdfile:@abstractCommand:
Actual output with
--reorder-codeActual output without
--reorder-code@abstractExpected
@abstractpreserved in both modes (same as the non---reorder-codebehaviour).