LayoutRules.md

February 11, 2016 ยท View on GitHub

Layout Rules (SA1500-)

Rules which enforce code layout and line spacing.

IdentifierNameDescription
SA1500BracesForMultiLineStatementsMustNotShareLineThe opening or closing brace within a C# statement, element, or expression is not placed on its own line.
SA1501StatementMustNotBeOnSingleLineA C# statement containing opening and closing braces is written completely on a single line.
SA1502ElementMustNotBeOnSingleLineA C# element containing opening and closing braces is written completely on a single line.
SA1503BracesMustNotBeOmittedThe opening and closing braces for a C# statement have been omitted.
SA1504AllAccessorsMustBeSingleLineOrMultiLineWithin a C# property, indexer or event, at least one of the child accessors is written on a single line, and at least one of the child accessors is written across multiple lines.
SA1505OpeningBracesMustNotBeFollowedByBlankLineAn opening brace within a C# element, statement, or expression is followed by a blank line.
SA1506ElementDocumentationHeadersMustNotBeFollowedByBlankLineAn element documentation header above a C# element is followed by a blank line.
SA1507CodeMustNotContainMultipleBlankLinesInARowThe C# code contains multiple blank lines in a row.
SA1508ClosingBracesMustNotBePrecededByBlankLineA closing brace within a C# element, statement, or expression is preceded by a blank line.
SA1509OpeningBracesMustNotBePrecededByBlankLineAn opening brace within a C# element, statement, or expression is preceded by a blank line.
SA1510ChainedStatementBlocksMustNotBePrecededByBlankLineChained C# statements are separated by a blank line.
SA1511WhileDoFooterMustNotBePrecededByBlankLineThe while footer at the bottom of a do-while statement is separated from the statement by a blank line.
SA1512SingleLineCommentsMustNotBeFollowedByBlankLineA single-line comment within C# code is followed by a blank line.
SA1513ClosingBraceMustBeFollowedByBlankLineA closing brace within a C# element, statement, or expression is not followed by a blank line.
SA1514ElementDocumentationHeaderMustBePrecededByBlankLineAn element documentation header above a C# element is not preceded by a blank line.
SA1515SingleLineCommentMustBePrecededByBlankLineA single-line comment within C# code is not preceded by a blank line.
SA1516ElementsMustBeSeparatedByBlankLineAdjacent C# elements are not separated by a blank line.
SA1517CodeMustNotContainBlankLinesAtStartOfFileThe code file has blank lines at the start.
SA1518UseLineEndingsCorrectlyAtEndOfFileThe line endings at the end of a file do not match the settings for the project.
SA1519BracesMustNotBeOmittedFromMultiLineChildStatementThe opening and closing braces for a multi-line C# statement have been omitted.
SA1520UseBracesConsistentlyThe opening and closing braces of a chained if/else if/else construct were included for some clauses, but omitted for others.