Skip to content

Reorder code: Add support for attaching some warnings to the line above them #164

@BabaR-f1

Description

@BabaR-f1

Using gdscript-formatter 0.14.0 via AUR
with Helix 25.07.1 with formatter = { command = "gdscript-formatter", args = ["--reorder-code"] } and auto-format = true

Dunno if it is related or was fixed with cf1c680.

Before:

extends Node

@warning_ignore_start("unused_signal")
signal signal1
signal signal2
@warning_ignore_restore("unused_signal")

func f1() -> void:
	print("Hi!")

After:

extends Node

@warning_ignore_start("unused_signal")
signal signal1
signal signal2


@warning_ignore_restore("unused_signal")
func f1() -> void:
	print("Hi!")

Expected behavior:

@warning_ignore_restore should stay at the same line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions