Skip to content

Inline commentary on variable get lowered down #335

Description

@blabdouze

Issue

Given this script :

static var MY_CONST_ARRAY := [] # gdlint-ignore
## Other var
var my_other_var

It gets reformated to :

static var MY_CONST_ARRAY := []

# gdlint-ignore
## Other var
var my_other_var

The inline comment should be kept as is, especially with # gdlint-ignore

Possible workarounds

Neither of them are optimal, but they can work.

Commentary above

# gdlint-ignore-next-line
static var MY_CONST_ARRAY := []

## Other var
var my_other_var

But i can break documentation generation which is not optimal

Disable formating

# fmt : off
## My documentation
static var MY_CONST_ARRAY := [] # gdlint-ignore
# fmt :on 
## Other var
var my_other_var

Which introduce a lot of noise and need to workaround documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions