Skip to content

Commit

Permalink
RCS1032: Include handling for SimpleMemberAccess (dotnet#1064)
Browse files Browse the repository at this point in the history
Co-authored-by: Josef Pihrt <[email protected]>
  • Loading branch information
2 people authored and JochemHarmes committed Oct 30, 2023
1 parent fad5d04 commit d181dfe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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

0 comments on commit d181dfe

Please sign in to comment.