TypeName | SA1008OpeningParenthesisMustBeSpacedCorrectly |
CheckId | SA1008 |
Category | Spacing Rules |
An opening parenthesis within a C# statement is not spaced correctly.
A violation of this rule occurs when the opening parenthesis within a statement is not spaced correctly. An opening parenthesis should not be preceded by any whitespace, unless it is the first character on the line, or it is preceded by certain C# keywords such as if, while, or for. In addition, an opening parenthesis is allowed to be preceded by whitespace when it follows an operator symbol within an expression.
An opening parenthesis should not be followed by whitespace, unless it is the last character on the line.
To fix a violation of this rule, ensure that the spacing around the opening parenthesis follows the rule described above.
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1008:OpeningParenthesisMustBeSpacedCorrectly", Justification = "Reviewed.")]
#pragma warning disable SA1008 // OpeningParenthesisMustBeSpacedCorrectly
#pragma warning restore SA1008 // OpeningParenthesisMustBeSpacedCorrectly