blob: a41741ab0f8e082bc103e30849078ea3f55fb7f5 [file] [log] [blame]
40 columns |
>>> empty record types don't split
someLongFunctionName__________________(() x) {}
<<<
someLongFunctionName__________________(
() x) {}
>>> unsplit short single positional field
(TypeName,) x;
<<<
(TypeName,) x;
>>> unsplit single positional field
function((VeryLongTypeName____________,) x) {;}
<<<
function(
(VeryLongTypeName____________,) x) {
;
}
>>> split single positional field
function((VeryLongTypeName___________________,) param) {;}
<<<
function(
(
VeryLongTypeName___________________,
) param) {
;
}
>>> prefer to split between type and variable
(LongTypeName, LongTypeName) longVariableName;
<<<
(
LongTypeName,
LongTypeName
) longVariableName;
>>> split positional
(TypeName,TypeName,TypeName,TypeName) x;
<<<
(
TypeName,
TypeName,
TypeName,
TypeName
) x;
>>> split positional
(TypeName,TypeName,TypeName,TypeName,TypeName) x;
<<<
(
TypeName,
TypeName,
TypeName,
TypeName,
TypeName
) x;
>>> split named
({TypeName a,TypeName b,TypeName c,TypeName d}) x;
<<<
({
TypeName a,
TypeName b,
TypeName c,
TypeName d
}) x;
>>> split named if positional splits
(TypeName,TypeName,TypeName,TypeName,{TypeName a,TypeName b}) x;
<<<
(
TypeName,
TypeName,
TypeName,
TypeName, {
TypeName a,
TypeName b
}) x;
>>> split positional if named splits
(TypeName,TypeName,{TypeName a,TypeName b,TypeName c,TypeName d}) x;
<<<
(
TypeName,
TypeName, {
TypeName a,
TypeName b,
TypeName c,
TypeName d
}) x;
>>> always split named with trailing comma
({int n,}) x;
<<<
({
int n,
}) x;
>>> split positional with trailing comma if more than one
(int m, int n,) x;
<<<
(
int m,
int n,
) x;
>>> split outer record if inner record splits
((TypeName,TypeName,TypeName,TypeName),TypeName) x;
<<<
(
(
TypeName,
TypeName,
TypeName,
TypeName
),
TypeName
) x;
>>> split outer type argument list if inner record splits
Map<String, (TypeName,TypeName,TypeName,TypeName)> map;
<<<
Map<
String,
(
TypeName,
TypeName,
TypeName,
TypeName
)> map;
>>> inside parameter list
function((TypeName, TypeName, TypeName, TypeName, TypeName) record) {;}
<<<
function(
(
TypeName,
TypeName,
TypeName,
TypeName,
TypeName
) record) {
;
}
>>> single positional trailing comma inside parameter list
function((TypeName,) record) {;}
<<<
function((TypeName,) record) {
;
}
>>> named parameter trailing comma inside parameter list
function(({TypeName param,}) record) {;}
<<<
function(
({
TypeName param,
}) record) {
;
}
>>> field formal parameter trailing comma inside parameter list
class C { C((TypeName,TypeName,) this.record) {;} }
<<<
class C {
C(
(
TypeName,
TypeName,
) this.record) {
;
}
}
>>> inside trailing comma parameter list
function((TypeName,TypeName,) record,) {;}
<<<
function(
(
TypeName,
TypeName,
) record,
) {
;
}
>>> trailing comma inside trailing comma parameter list
function((TypeName,TypeName,) record,) {;}
<<<
function(
(
TypeName,
TypeName,
) record,
) {
;
}