Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.13 KB

RCS1035.md

File metadata and controls

51 lines (37 loc) · 1.13 KB

RCS1035: Remove redundant comma in initializer

Property Value
Id RCS1035
Category Redundancy
Default Severity Hidden
Enabled by Default -
Supports Fade-Out
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

public void Foo()
{
    var arr = new string[] { "a", "b", "c", }; // RCS1035
}

Code with Fix

public void Foo()
{
    var arr = new string[] { "a", "b", "c" };
}

How to Suppress

SuppressMessageAttribute

[assembly: SuppressMessage("Redundancy", "RCS1035:Remove redundant comma in initializer.", Justification = "<Pending>")]

#pragma

#pragma warning disable RCS1035 // Remove redundant comma in initializer.
#pragma warning restore RCS1035 // Remove redundant comma in initializer.

Ruleset

(Generated with DotMarkdown)