Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.02 KB

SA1016.md

File metadata and controls

41 lines (30 loc) · 1.02 KB

SA1016

TypeName SA1016OpeningAttributeBracketsMustBeSpacedCorrectly
CheckId SA1016
Category Spacing Rules

Cause

An opening attribute bracket within a C# element is not spaced correctly.

Rule description

A violation of this rule occurs when the spacing around an opening attribute bracket is not correct.

An opening attribute bracket should never be followed by whitespace, unless the bracket is the last character on the line.

How to fix violations

To fix a violation of this rule, ensure that there is no whitespace after the opening attribute bracket.

How to suppress violations

[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1016:OpeningAttributeBracketsMustBeSpacedCorrectly", Justification = "Reviewed.")]
#pragma warning disable SA1016 // OpeningAttributeBracketsMustBeSpacedCorrectly
#pragma warning restore SA1016 // OpeningAttributeBracketsMustBeSpacedCorrectly