Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add analyzer RCS0062, put expression body on its own line (#1575) #1593

Merged
merged 7 commits into from
Feb 8, 2025
Prev Previous commit
Add option arrow_token_new_line to RCS1016 and RR0169
  • Loading branch information
cbersch committed Feb 2, 2025
commit 01b9b7a3b6227a8c76de235c425e8a9ca2f24ea7
1 change: 1 addition & 0 deletions src/Analyzers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,7 @@ foreach (var item in items)
<Option Key="body_style" IsRequired="true" />
<Option Key="use_block_body_when_declaration_spans_over_multiple_lines" IsRequired="true" />
<Option Key="use_block_body_when_expression_spans_over_multiple_lines" IsRequired="true" />
<Option Key="arrow_token_new_line" IsRequired="false" />
</ConfigOptions>
<Options>
<Option Identifier="ConvertExpressionBodyToBlockBodyWhenExpressionIsMultiLine">
Expand Down
3 changes: 3 additions & 0 deletions src/Refactorings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,9 @@ i--;]]></After>
<Syntax>operator</Syntax>
</Syntaxes>
<Span>body or accessor list</Span>
<ConfigOptions>
<Option Key="arrow_token_new_line" IsRequired="false" />
</ConfigOptions>
</Refactoring>
<Refactoring Id="RR0170" Identifier="UseLambdaInsteadOfAnonymousMethod" Title="Use lambda instead of anonymous method">
<OptionKey>use_lambda_instead_of_anonymous_method</OptionKey>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ roslynator_analyzers.enabled_by_default = true|false
# Applicable to: rcs1014

#roslynator_arrow_token_new_line = after|before
# Applicable to: rcs0032, rcs0062
# Applicable to: rcs0032, rcs0062, rcs1016

#roslynator_binary_operator_new_line = after|before
# Applicable to: rcs0027
Expand Down Expand Up @@ -346,7 +346,7 @@ roslynator_analyzers.enabled_by_default = true|false

# Use block body or expression body
#dotnet_diagnostic.rcs1016.severity = none
# Options: roslynator_body_style, roslynator_use_block_body_when_declaration_spans_over_multiple_lines, roslynator_use_block_body_when_expression_spans_over_multiple_lines
# Options: roslynator_arrow_token_new_line, roslynator_body_style, roslynator_use_block_body_when_declaration_spans_over_multiple_lines, roslynator_use_block_body_when_expression_spans_over_multiple_lines

# Add/remove accessibility modifiers
#dotnet_diagnostic.rcs1018.severity = none
Expand Down
Loading