Skip to content

BRO1118: Parameter list should follow declaration

No blank line between the opening parenthesis and the first parameter or argument. Replaces StyleCop SA1114.

Example

Before

public class Mailer
{
    public void Send(

        string to,
        string subject)
    {
    }
}

After

public class Mailer
{
    public void Send(
        string to,
        string subject)
    {
    }
}

Why

A blank line inside a parameter list separates the list from its own declaration.

How the fix works

The blank lines are removed. Parameter lists, argument lists, attribute arguments and indexer brackets are checked.

Not reported

  • A comment between the parenthesis and the first item: the fix would have to move it (StyleCop reports it and has no fix).

Compared with StyleCop

Same positions as StyleCop, except a comment before the first item. StyleCop has no fix for SA1114.