Skip to content

More empty lines should be removed in some cases #595

@baryluk

Description

@baryluk
int main(string[] args) {

    if (args.lentgh > 2) {
        import std.stdio;

        writefln(args[1]);
    }

}

--brace_style=otbs

dfmt v0.15.1-debug

If it is a start or end of a scope, and there are no other things (like comments), these empty lines should be removed, and produce:

int main(string[] args) {
    if (args.lentgh > 2) {
        import std.stdio;

        writefln(args[1]);
    }
}

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