-
Notifications
You must be signed in to change notification settings - Fork 23
SA1103
TypeName |
QueryClausesMustBeOnSeparateLinesOrAllOnOneLine |
CheckId |
SA1103 |
Category |
Readability Rules |
The clauses within a C# query expression are not all placed on the same line, and each clause is not placed on its own line.
A violation of this rule occurs when the query clauses are not either placed all on the same line, or each on its own line. For example:
object x = from num in numbers
select num;
The query clauses can correctly be written as:
object x = from num in numbers select num;
or:
object x =
from num in numbers
select num;
To fix a violation of this rule, ensure that all clauses are placed together on the same line, or each clausebegins on its own line.
[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1103:QueryClausesMustBeOnSeparateLinesOrAllOnOneLine", Justification = "Reviewed.")]
</div>
</body>
- - 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