-
Notifications
You must be signed in to change notification settings - Fork 22
SA1000
TypeName |
KeywordsMustBeSpacedCorrectly |
CheckId |
SA1000 |
Category |
Spacing Rules |
The spacing around a C# keyword is incorrect.
A violation of this rule occurs when the spacing around a keyword is incorrect.
The following C# keywords must always be followed by a single space: catch, fixed, for, foreach, from, group, if, in, into, join, let, lock, orderby, return, select, stackalloc, switch, throw, using, where, while, yield.
The following keywords must not be followed by any space: checked, default, sizeof, typeof, unchecked.
The new keyword should always be followed by a space, unless it is used to create a new array, in which case there should be no space between the new keyword and the opening array bracket.
To fix a violation of this rule, add or remove a space after the keyword, according to the description above.
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1000:KeywordsMustBeSpacedCorrectly", Justification = "Reviewed.")]
- - SA0102 - Clean Install
- - Download
- - Documentation Rules - Layout Rules - Maintainability Rules - Naming Rules - Ordering Rules - Readability Rules - Spacing Rules - Suppressions
- - Adding a custom StyleCop settings page - Adding custom rule settings - Authoring a custom styleCop rule - Authoring rules metadata - Custom CSharp Language Service - Custom MSBuild Integration - Hosting StyleCop in a Custom Environment - Installing a Custom Rule - Integrating StyleCop Into Build Environments - Integrating StyleCop into MSBuild - Writing Custom Rules for StyleCop