| 40 columns | |
| >>> empty records don't split |
| var longVariableName_______________ = (); |
| <<< |
| var longVariableName_______________ = |
| (); |
| >>> single-element record |
| var record = (veryLongRecordField________________,); |
| <<< |
| var record = ( |
| veryLongRecordField________________, |
| ); |
| >>> single-element named record |
| var record = (longFieldName: longRecordFieldValue); |
| <<< |
| var record = ( |
| longFieldName: longRecordFieldValue |
| ); |
| >>> single-element named record splits at name |
| var record = (longFieldName: veryLongRecordFieldValue); |
| <<< |
| var record = ( |
| longFieldName: |
| veryLongRecordFieldValue |
| ); |
| >>> exactly 40 characters |
| (first, second, third, fourth, seventh); |
| <<< |
| (first, second, third, fourth, seventh); |
| >>> |
| (first, second, third, fourth, fifth, sixth); |
| <<< |
| ( |
| first, |
| second, |
| third, |
| fourth, |
| fifth, |
| sixth |
| ); |
| >>> don't force outer record to split |
| ((first,), (second, third)); |
| <<< |
| ((first,), (second, third)); |
| >>> don't force outer list to split |
| [(first,), (second, third)]; |
| <<< |
| [(first,), (second, third)]; |
| >>> inner list doesn't force split |
| ([first], [second, third]); |
| <<< |
| ([first], [second, third]); |
| >>> nested split record |
| (first, (second, third, fourth), fifth, (sixth, seventh, eighth, nine, tenth, |
| eleventh)); |
| <<< |
| ( |
| first, |
| (second, third, fourth), |
| fifth, |
| ( |
| sixth, |
| seventh, |
| eighth, |
| nine, |
| tenth, |
| eleventh |
| ) |
| ); |
| >>> force multi-line because of contained block |
| (first, () {"fn";},third,fourth); |
| <<< |
| ( |
| first, |
| () { |
| "fn"; |
| }, |
| third, |
| fourth |
| ); |
| >>> trailing comma in single-element does not split |
| (1,); |
| <<< |
| (1,); |
| >>> trailing comma in multi-element does force split |
| (1,2,); |
| <<< |
| ( |
| 1, |
| 2, |
| ); |
| >>> preserve newlines in records containing a line comment |
| ( |
| // yeah |
| a,b,c, |
| d,e,f, |
| ); |
| <<< |
| ( |
| // yeah |
| a, b, c, |
| d, e, f, |
| ); |
| >>> wrap between elements even when newlines are preserved |
| ( |
| // yes |
| longElement,longElement,longElement,longElement, |
| longElement,longElement,longElement,longElement,longElement,longElement, |
| ); |
| <<< |
| ( |
| // yes |
| longElement, longElement, longElement, |
| longElement, |
| longElement, longElement, longElement, |
| longElement, longElement, longElement, |
| ); |
| >>> ignore line comment after the "]" |
| ( |
| a,b,c, |
| d |
| ) // comment |
| ; |
| <<< |
| (a, b, c, d) // comment |
| ; |
| >>> preserves one blank line between elements |
| ( |
| |
| |
| element, |
| |
| |
| |
| // comment |
| element, |
| |
| |
| |
| element |
| |
| |
| ); |
| <<< |
| ( |
| element, |
| |
| // comment |
| element, |
| |
| element |
| ); |
| >>> format like a block in an argument list |
| longFunctionName((element, element), (element, element, element, element)); |
| <<< |
| longFunctionName(( |
| element, |
| element |
| ), ( |
| element, |
| element, |
| element, |
| element |
| )); |
| >>> format like a block in an argument list |
| longFunctionName((element, element, element, element)); |
| <<< |
| longFunctionName(( |
| element, |
| element, |
| element, |
| element |
| )); |
| >>> don't allow splitting between field name and record |
| var record = (argument, argument, argument, recordFieldName: (veryLongElement__________,)); |
| <<< |
| var record = ( |
| argument, |
| argument, |
| argument, |
| recordFieldName: ( |
| veryLongElement__________, |
| ) |
| ); |
| >>> don't allow splitting between argument name and record |
| longFunctionName(argument, argument, argument, argument, argument, argument, |
| argumentName: (veryLongElement__________,)); |
| <<< |
| longFunctionName( |
| argument, |
| argument, |
| argument, |
| argument, |
| argument, |
| argument, |
| argumentName: ( |
| veryLongElement__________, |
| )); |