Skip to content

Expressions that involve nested func calls get wrapped more than they should #1392

@Rassi

Description

@Rassi
A(B(C(
    D(a |
        b | c))));

Results in an indentation of "D" for each nested func.

A(B(C(
            D(a |
                b | c))));

What we want instead is what is in the original - each newline should cause a single indent, regardless of nesting.

Expected versus output diff:

diff --git "a/C:\\dev\\uncrustify\\tests\\output\\staging\\60036-UNI-2680.cpp" "b/C:\\dev\\uncrustify\\tests\\results\\staging\\60036-UNI-2680.cpp"
index b6aa5bd..1dfba96 100644
--- "a/C:\\dev\\uncrustify\\tests\\output\\staging\\60036-UNI-2680.cpp"
+++ "b/C:\\dev\\uncrustify\\tests\\results\\staging\\60036-UNI-2680.cpp"
@@ -1,3 +1,3 @@
 A(B(C(
-    D(a |
-        b | c))));
+            D(a |
+                b | c))));

Debug support files:

60036-UNI-2680.cpp
60036-UNI-2680.cpp.log
60036-UNI-2680.cpp.unc
Uncrustify.Cpp.cfg
UNI-2680.cpp

Disclaimer:

Note: This is a generated issue from our internal issue tracker.
Expect a dry description which could be insufficient to properly understand the issue.
On the other hand, the support files should be sufficient to easily reproduce and debug the issue,
but please comment if it's still unclear and I will get back with clarifications.
See main discussion thread here #1223.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions