Skip to content

Commit

Permalink
Update documentation for SA1413 to include rationale
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Jun 16, 2017
1 parent 66ef515 commit af15571
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions documentation/SA1413.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@

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

### Rationale

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

## Rule description

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

0 comments on commit af15571

Please sign in to comment.