Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format multiline arrays first #538

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

belka-ew
Copy link
Collaborator

This fixes an inconsistency between --keep_line_breaks and normal formatting, --keep_line_breaks inserts a newline in the UFCS chain (before .value), where the normal formatting doesn't.

@@ -1,7 +1,8 @@
 unittest
 {
     functionLengthDoesMatter([
-            firstFunctionInChain("A").seconFunctionInChain("B").value,
+            firstFunctionInChain("A").seconFunctionInChain("B")
+            .value,
             firstFunctionInChain("A").seconFunctionInChain("B").value
             ]);
 }

@PetarKirov
Copy link
Member

@belka-ew Please rebase as #537 is now merged and is modifying the same function as this PR.

@belka-ew belka-ew force-pushed the multiline-array-chain branch from 8bda689 to 5856213 Compare June 12, 2021 18:52
@belka-ew belka-ew requested a review from PetarKirov June 12, 2021 19:14
@belka-ew belka-ew force-pushed the multiline-array-chain branch from 5856213 to 96b2701 Compare June 16, 2021 10:55
@belka-ew
Copy link
Collaborator Author

Rebased.

@PetarKirov PetarKirov added area:array Formatting inside arrays or associative arrays affected auto-merge labels Jun 16, 2021
@PetarKirov
Copy link
Member

Thanks for the ping @belka-ew!

@PetarKirov PetarKirov merged commit f6490b3 into dlang-community:master Jun 16, 2021
@belka-ew belka-ew deleted the multiline-array-chain branch June 16, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:array Formatting inside arrays or associative arrays affected auto-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants