Skip to content

gdformat fixes @warning_ignore_start and causes "expected newline" parser error #394

@olena-palii

Description

@olena-palii

Godot: 4.4.1
gdtoolkit: 4.3.4

extends Node

@warning_ignore_start("UNUSED_SIGNAL")

signal say(message: String)

Run gdlint ./ -> ✅ Success: no problems found (I don't know why but it stopped detecting any issues at all)
Run gdformat ./ -> 1 file reformatted.

Result:

extends Node

@warning_ignore_start("UNUSED_SIGNAL") signal say(message: String)

❌ Godot throws "Parser Error: Expected newline after a standalone annotation." when trying to run the project

Workaround: add comment in between

extends Node

@warning_ignore_start("UNUSED_SIGNAL")
# I need this space to prevent formatting issues
signal say(message: String)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions