Skip to content

Commit af15571

Browse files
committed
Update documentation for SA1413 to include rationale
Closes #2416
1 parent 66ef515 commit af15571

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

documentation/SA1413.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121

2222
The last statement in a multi-line C# initializer is missing a trailing comma.
2323

24+
### Rationale
25+
26+
This rule is specifically designed to work well with the most widely used source control systems as an aid to long-term
27+
code review. By placing a comma on the last line of a multi-line sequence, developers who append an item to the list or
28+
reorder the list at some point in the future will not need to modify any more lines than absolutely necessary for the
29+
change. As a result, the size of the subsequent code review is minimized and focused, and tools like **git blame**
30+
continue to show the original author and commit for the item that was previously last in the list.
31+
2432
## Rule description
2533

2634
A violation of this rule occurs when the last statement of a C# initializer is missing a trailing comma.

0 commit comments

Comments
 (0)