SpacingRules.md

February 11, 2016 ยท View on GitHub

Spacing Rules (SA1000-)

Rules which enforce spacing requirements around keywords and symbols in the code.

IdentifierNameDescription
SA1000KeywordsMustBeSpacedCorrectlyThe spacing around a C# keyword is incorrect.
SA1001CommasMustBeSpacedCorrectlyThe spacing around a comma is incorrect, within a C# code file.
SA1002SemicolonsMustBeSpacedCorrectlyThe spacing around a semicolon is incorrect, within a C# code file.
SA1003SymbolsMustBeSpacedCorrectlyThe spacing around an operator symbol is incorrect, within a C# code file.
SA1004DocumentationLinesMustBeginWithSingleSpaceA line within a documentation header above a C# element does not begin with a single space.
SA1005SingleLineCommentsMustBeginWithSingleSpaceA single-line comment within a C# code file does not begin with a single space.
SA1006PreprocessorKeywordsMustNotBePrecededBySpaceA C# preprocessor-type keyword is preceded by space.
SA1007OperatorKeywordMustBeFollowedBySpaceThe operator keyword within a C# operator overload method is not followed by any whitespace.
SA1008OpeningParenthesisMustBeSpacedCorrectlyAn opening parenthesis within a C# statement is not spaced correctly.
SA1009ClosingParenthesisMustBeSpacedCorrectlyA closing parenthesis within a C# statement is not spaced correctly.
SA1010OpeningSquareBracketsMustBeSpacedCorrectlyAn opening square bracket within a C# statement is not spaced correctly.
SA1011ClosingSquareBracketsMustBeSpacedCorrectlyA closing square bracket within a C# statement is not spaced correctly.
SA1012OpeningBracesMustBeSpacedCorrectlyAn opening brace within a C# element is not spaced correctly.
SA1013ClosingBracesMustBeSpacedCorrectlyA closing brace within a C# element is not spaced correctly.
SA1014OpeningGenericBracketsMustBeSpacedCorrectlyAn opening generic bracket within a C# element is not spaced correctly.
SA1015ClosingGenericBracketsMustBeSpacedCorrectlyA closing generic bracket within a C# element is not spaced correctly.
SA1016OpeningAttributeBracketsMustBeSpacedCorrectlyAn opening attribute bracket within a C# element is not spaced correctly.
SA1017ClosingAttributeBracketsMustBeSpacedCorrectlyA closing attribute bracket within a C# element is not spaced correctly.
SA1018NullableTypeSymbolsMustNotBePrecededBySpaceA nullable type symbol within a C# element is not spaced correctly.
SA1019MemberAccessSymbolsMustBeSpacedCorrectlyThe spacing around a member access symbol is incorrect, within a C# code file.
SA1020IncrementDecrementSymbolsMustBeSpacedCorrectlyAn increment or decrement symbol within a C# element is not spaced correctly.
SA1021NegativeSignsMustBeSpacedCorrectlyA negative sign within a C# element is not spaced correctly.
SA1022PositiveSignsMustBeSpacedCorrectlyA positive sign within a C# element is not spaced correctly.
SA1023DereferenceAndAccessOfMustBeSpacedCorrectlyA dereference symbol or an access-of symbol within a C# element is not spaced correctly.
SA1024ColonsMustBeSpacedCorrectlyA colon within a C# element is not spaced correctly.
SA1025CodeMustNotContainMultipleWhitespaceInARowThe code contains multiple whitespace characters in a row.
SA1026CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocationAn implicitly typed new array allocation within a C# code file is not spaced correctly.
SA1027UseTabsCorrectlyThe code contains a tab or space character which is not consistent with the current project settings.
SA1028CodeMustNotContainTrailingWhitespaceA line of code ends with a space, tab, or other whitespace characters before the end of line character(s).