Skip to content

Commit ff4f970

Browse files
committed
Clarify that SA1413 is also reported for enum members
1 parent af15571 commit ff4f970

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

documentation/SA1413.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
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

3636
For 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

6062
To fix a violation of this rule, add a trailing comma to the last statement in the initializer.

0 commit comments

Comments
 (0)