smithy icon indicating copy to clipboard operation
smithy copied to clipboard

`smithy format` puts postfix inline comments in the wrong place

Open rhernandez35 opened this issue 1 year ago • 1 comments

smithy format will turn this:

operation Demo {
    input: Unit // No input
    output := {
        foo: String
    }
}

into this:

operation Demo {
    input: Unit

    // No input
    output := {
        foo: String
    }
}

I would expect a trailing comment to adorn the syntactical element it's sharing a line with and not with the element following it.

rhernandez35 avatar Oct 24 '24 01:10 rhernandez35

Possible duplicate of #2279

tripplilley avatar Oct 31 '24 17:10 tripplilley

Correct, closing as a duplicate of #2279

kstich avatar Nov 05 '24 19:11 kstich