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 all 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 @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [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)).
- Do not report `System.Windows.DependencyPropertyChangedEventArgs` as unused parameter ([RCS1163](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1163.md)) ([#1068](https://github.com/JosefPihrt/Roslynator/pull/1068)).
- Fix ([RCS1032](https://github.com/JosefPihrt/Roslynator/blob/main/docs/analyzers/RCS1032.md)) ([#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