blob: 29b15c508d27676eac0b68fc8328a6f3c2a09491 [file] [log] [blame]
40 columns |
>>> initializer doesn't fit one line, wrap inside, keep name
var result = myFunction(argument * argument, argument * argument);
<<<
var result = myFunction(
argument * argument,
argument * argument);
>>> initializer doesn't fit one line, wrap inside, keep name
result = myFunction(argument, argument, argument, argument);
<<<
result = myFunction(argument, argument,
argument, argument);
>>> wrapped initializer fits one line
variable = longFunctionIsLoooooong(argument);
<<<
variable =
longFunctionIsLoooooong(argument);
>>> initializer doesn't fit one line, name too long
variable = longFunctionIsLooooooooooooooong(argument, argument);
<<<
variable =
longFunctionIsLooooooooooooooong(
argument, argument);
>>> initializer doesn't fit one line, cannot be split
variableName = thisIsReallyQuiteAVeryLongVariableName;
<<<
variableName =
thisIsReallyQuiteAVeryLongVariableName;
>>> long function call initializer
variableName = functionName(first, second);
<<<
variableName =
functionName(first, second);
>>> long binary expression initializer
variableName = argument * argument + argument;
<<<
variableName =
argument * argument + argument;
>>> prefer to split at "=" instead of pattern
(longIdentifier && anotherOne) = longValue;
<<<
(longIdentifier && anotherOne) =
longValue;
>>> split in infix pattern
(veryLongIdentifier && anotherAlsoLongOne) = value;
<<<
(veryLongIdentifier &&
anotherAlsoLongOne) = value;
>>> split in list pattern
[first, second, third, fourth, fifth, sixth] = value;
<<<
[
first,
second,
third,
fourth,
fifth,
sixth
] = value;
>>> split in map pattern
{first: second, third: fourth, fifth: sixth} = value;
<<<
{
first: second,
third: fourth,
fifth: sixth
} = value;
>>> split in record pattern
(first, second, third, fourth, fifth, sixth) = value;
<<<
(
first,
second,
third,
fourth,
fifth,
sixth
) = value;
>>> split in object pattern
Foo(:first, :second, :third, :fourth, :fifth) = value;
<<<
Foo(
:first,
:second,
:third,
:fourth,
:fifth
) = value;
>>> split in value
(first, second, third) = longValueExpression + anotherOperand + aThirdOperand;
<<<
(first, second, third) =
longValueExpression +
anotherOperand +
aThirdOperand;
>>> expression split in both
(veryLongIdentifier && anotherAlsoLongOne) = longValueExpression + anotherOperand + aThirdOperand;
<<<
(veryLongIdentifier &&
anotherAlsoLongOne) =
longValueExpression +
anotherOperand +
aThirdOperand;
>>> collection-like split in both
(first, second, third, fourth, fifth, sixth) = (first, second, third, fourth, fifth);
<<<
(
first,
second,
third,
fourth,
fifth,
sixth
) = (
first,
second,
third,
fourth,
fifth
);
>>> expression split in pattern, collection-like in value
(veryLongIdentifier && anotherAlsoLongOne) = (first, second, third, fourth, fifth);
<<<
(veryLongIdentifier &&
anotherAlsoLongOne) = (
first,
second,
third,
fourth,
fifth
);
>>> expression split in pattern, collection-like in value
(veryLongIdentifier && anotherAlsoLongOne) = (first, second, third, fourth, fifth);
<<<
(veryLongIdentifier &&
anotherAlsoLongOne) = (
first,
second,
third,
fourth,
fifth
);