Skip to content

Short variables declaration should not break. #1139

@jods4

Description

@jods4

Input:

bool excluded = false, included = false;        

Output:

// Formatted by 0.27
bool excluded = false,
    included = false;

Expected behavior:
I think the CSharpier formatting defeats the intent of putting multiple variable declarations on a single line.
Unless the line is too long, CSharpier should not break it automatically.
Also, if the line overflows, I guess it wouldn't be nice to have one variable per line, but rather to put as many as possible.

Degenerate case:

int i, j, k;

// Formatted by 0.27
int i,
    j,
    k;

If I was going for this style, I'd rather type the following:

int i;
int j;
int k;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions