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

RCS1032: Include handling for SimpleMemberAccess #1064

Merged
merged 3 commits into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [CLI] Analyze command does not create the XML output file and returns incorrect exit code when only compiler diagnostics are reported ([#1056](https://github.com/JosefPihrt/Roslynator/pull/1056) by @PeterKaszab).
- [CLI] Fix exit code when multiple projects are processed ([#1061](https://github.com/JosefPihrt/Roslynator/pull/1061) by @PeterKaszab).
- Fix code fix for CS0164 ([#1031](https://github.com/JosefPihrt/Roslynator/pull/1031)).
- Fix RCS1032 ([#1064](https://github.com/JosefPihrt/Roslynator/pull/1064)).


## [4.2.0] - 2022-11-27
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ private static void AnalyzeParenthesizedExpression(SyntaxNodeAnalysisContext con
case SyntaxKind.GreaterThanOrEqualExpression:
case SyntaxKind.EqualsExpression:
case SyntaxKind.NotEqualsExpression:
{
case SyntaxKind.SimpleMemberAccessExpression:
{
if (expression.IsKind(SyntaxKind.IdentifierName)
|| expression is LiteralExpressionSyntax)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ void M()
[InlineData(@"M([|(|]""""));", @"M("""");")]
[InlineData("var arr = new string[] { [|(|]null) };", "var arr = new string[] { null };")]
[InlineData("var items = new List<string>() { [|(|]null) };", "var items = new List<string>() { null };")]
[InlineData("var x = [|(|]i).ToString();","var x = i.ToString();")]
[InlineData(@"s = $""{[|(|]"""")}"";", @"s = $""{""""}"";")]
[InlineData("[|(|]i) = [|(|]0);", "i = 0;")]
[InlineData("[|(|]i) += [|(|]0);", "i += 0;")]
Expand Down