TypeName | SA1012OpeningBracesMustBeSpacedCorrectly |
CheckId | SA1012 |
Category | Spacing Rules |
An opening brace within a C# element is not spaced correctly.
A violation of this rule occurs when the spacing around an opening brace is not correct.
An opening brace should always be preceded by a single space, unless it is the first character on the line, or unless it is preceded by an opening parenthesis, in which case there should be no space between the parenthesis and the brace.
An opening brace should always be followed by a single space, unless it is the last character on the line.
To fix a violation of this rule, ensure that the spacing around the opening brace follows the rule described above.
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1012:OpeningBracesMustBeSpacedCorrectly", Justification = "Reviewed.")]
#pragma warning disable SA1012 // OpeningBracesMustBeSpacedCorrectly
#pragma warning restore SA1012 // OpeningBracesMustBeSpacedCorrectly