Skip to content

Latest commit

 

History

History
26 lines (25 loc) · 3.25 KB

LayoutRules.md

File metadata and controls

26 lines (25 loc) · 3.25 KB

Layout Rules (SA1500-)

Rules which enforce code layout and line spacing.

Identifier Name Description
SA1500 BracesForMultiLineStatementsMustNotShareLine The opening or closing brace within a C# statement, element, or expression is not placed on its own line.
SA1501 StatementMustNotBeOnSingleLine A C# statement containing opening and closing braces is written completely on a single line.
SA1502 ElementMustNotBeOnSingleLine A C# element containing opening and closing braces is written completely on a single line.
SA1503 BracesMustNotBeOmitted The opening and closing braces for a C# statement have been omitted.
SA1504 AllAccessorsMustBeSingleLineOrMultiLine Within 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.
SA1505 OpeningBracesMustNotBeFollowedByBlankLine An opening brace within a C# element, statement, or expression is followed by a blank line.
SA1506 ElementDocumentationHeadersMustNotBeFollowedByBlankLine An element documentation header above a C# element is followed by a blank line.
SA1507 CodeMustNotContainMultipleBlankLinesInARow The C# code contains multiple blank lines in a row.
SA1508 ClosingBracesMustNotBePrecededByBlankLine A closing brace within a C# element, statement, or expression is preceded by a blank line.
SA1509 OpeningBracesMustNotBePrecededByBlankLine An opening brace within a C# element, statement, or expression is preceded by a blank line.
SA1510 ChainedStatementBlocksMustNotBePrecededByBlankLine Chained C# statements are separated by a blank line.
SA1511 WhileDoFooterMustNotBePrecededByBlankLine The while footer at the bottom of a do-while statement is separated from the statement by a blank line.
SA1512 SingleLineCommentsMustNotBeFollowedByBlankLine A single-line comment within C# code is followed by a blank line.
SA1513 ClosingBraceMustBeFollowedByBlankLine A closing brace within a C# element, statement, or expression is not followed by a blank line.
SA1514 ElementDocumentationHeaderMustBePrecededByBlankLine An element documentation header above a C# element is not preceded by a blank line.
SA1515 SingleLineCommentMustBePrecededByBlankLine A single-line comment within C# code is not preceded by a blank line.
SA1516 ElementsMustBeSeparatedByBlankLine Adjacent C# elements are not separated by a blank line.
SA1517 CodeMustNotContainBlankLinesAtStartOfFile The code file has blank lines at the start.
SA1518 UseLineEndingsCorrectlyAtEndOfFile The line endings at the end of a file do not match the settings for the project.
SA1519 BracesMustNotBeOmittedFromMultiLineChildStatement The opening and closing braces for a multi-line C# statement have been omitted.
SA1520 UseBracesConsistently The opening and closing braces of a chained if/else if/else construct were included for some clauses, but omitted for others.