Skip to content

Extra newlines are added after switch case statements on strings in C# #1257

@mihaipopescu

Description

@mihaipopescu

Expected versus output diff:

diff --git "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\60008-UNI-17253.cs" "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\60008-UNI-17253.cs"
index 793c0a8..ed93e70 100644
--- "a/C:\\work\\external\\uncrustify\\tests\\output\\staging\\60008-UNI-17253.cs"
+++ "b/C:\\work\\external\\uncrustify\\tests\\results\\staging\\60008-UNI-17253.cs"
@@ -1,9 +1,11 @@
-// It adds an extra newline after each case 
+// It adds an extra newline after each case
 switch (someString)
 {
     case "a":
+
         return foo;
 
     case "b":
+
         return bar;
 }

Debug support files:

60008-UNI-17253.cs
60008-UNI-17253.cs.log
60008-UNI-17253.cs.unc
Uncrustify.JamCS.cfg
UNI-17253.cs

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

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions