Skip to content

-s produces redundant semicolons when processing code that already has semicolons on the lines #1

@DilemmaGX

Description

@DilemmaGX

I ran fuse-formatter .\sort.fuse -i 4 -s -o sort.fuse three times, and this resulted in multiple redundant semicolons being produced:

@export("start sort") fn sort() once -> void {
    n = array.length;
    ;
    ;
    for (i = 1; i <= n; i++) {
        for (j = 1; j <= n - i + 1; j++) {
            if (array[j - 1] > array[j]) {
                temp = array[j - 1];
                ;
                ;
                array[j - 1] = array[j];
                ;
                ;
                array[j] = temp;
                ;
                ;
            }
        }
    }
}

Though this formatter may be designed not to save formatted code to the input file, this should be considered incorrect behavior.

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