File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020## Cause
2121
22- The last statement in a multi-line C# initializer is missing a trailing comma.
22+ The last statement in a multi-line C# initializer or list is missing a trailing comma.
2323
2424### Rationale
2525
@@ -31,7 +31,7 @@ continue to show the original author and commit for the item that was previously
3131
3232## Rule description
3333
34- A violation of this rule occurs when the last statement of a C# initializer is missing a trailing comma.
34+ A violation of this rule occurs when the last statement of a C# initializer or list is missing a trailing comma.
3535
3636For example, the following code would generate one instance of this violation:
3737
@@ -55,6 +55,8 @@ var x = new Barnacle
5555};
5656```
5757
58+ This diagnostic is also reported for other forms of comma-separated list, such as enum members.
59+
5860## How to fix violations
5961
6062To fix a violation of this rule, add a trailing comma to the last statement in the initializer.
You can’t perform that action at this time.
0 commit comments