forked from belav/csharpier
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing issue with a trailing comma being added after a trailing comme…
…nt (belav#1370) closes belav#1354 --------- Co-authored-by: Lasath Fernando <devel@lasath.org>
- Loading branch information
Showing
6 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...CSharpier.Tests/FormattingTests/TestFiles/cs/TrailingComma_TrailingComments.expected.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = 2, // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = [], // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = | ||
[ /* this formatting isn't ideal, but this probably won't happen in the real world */ | ||
], // Trailing Comment | ||
}; |
17 changes: 17 additions & 0 deletions
17
Src/CSharpier.Tests/FormattingTests/TestFiles/cs/TrailingComma_TrailingComments.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = 2 // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = [] // Trailing Comment | ||
}; | ||
|
||
var someObject = new SomeObject() | ||
{ | ||
Property1 = 1, | ||
Property2 = [/* this formatting isn't ideal, but this probably won't happen in the real world */ ] // Trailing Comment | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters