Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.34 KB

SA1114.md

File metadata and controls

60 lines (45 loc) · 1.34 KB

SA1114

TypeName SA1114ParameterListMustFollowDeclaration
CheckId SA1114
Category Readability Rules

Cause

The start of the parameter list for a method or indexer call or declaration does not begin on the same line as the opening bracket, or on the line after the opening bracket.

Rule description

A violation of this rule occurs when there are one or more blank lines between the opening bracket and the start of the parameter list. For example:

public string JoinName(

    string first, string last)
{
}

The parameter list should begin on the same line as the opening bracket, or on the next line. For example:

public string JoinName(string first, string last)
{
}

public string JoinName(
    string first, string last)
{
}

How to fix violations

To fix a violation of this rule, ensure that the parameter list begins on the same line as the opening bracket, or on the next line.

How to suppress violations

[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1114:ParameterListMustFollowDeclaration", Justification = "Reviewed.")]
#pragma warning disable SA1114 // ParameterListMustFollowDeclaration
#pragma warning restore SA1114 // ParameterListMustFollowDeclaration