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
Fix S1905 FP: Nullability context and array of anonymous types #6753
Conversation
53fd779
to
f02a011
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nice refactoring and the solution seems also right to me.
analyzers/tests/SonarAnalyzer.UnitTest/Rules/RedundantCastTest.cs
Outdated
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/TestCases/RedundantCast.CSharp8.cs
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/TestCases/RedundantCast.CSharp8.cs
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/Rules/RedundantCastTest.cs
Outdated
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/Rules/RedundantCastTest.cs
Outdated
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/Rules/RedundantCastTest.cs
Outdated
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/Rules/RedundantCastTest.cs
Outdated
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/Rules/RedundantCastTest.cs
Outdated
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/TestCases/RedundantCast.CSharp8.cs
Show resolved
Hide resolved
analyzers/tests/SonarAnalyzer.UnitTest/TestCases/RedundantCast.CSharp8.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you bump the coverage in the touched code paths?
analyzers/tests/SonarAnalyzer.UnitTest/TestCases/RedundantCast.CSharp8.cs
Show resolved
Hide resolved
Co-authored-by: Martin Strecker <103252490+martin-strecker-sonarsource@users.noreply.github.com>
Co-authored-by: Martin Strecker <103252490+martin-strecker-sonarsource@users.noreply.github.com>
Co-authored-by: Martin Strecker <103252490+martin-strecker-sonarsource@users.noreply.github.com>
a1de28d
to
943592d
Compare
Kudos, SonarCloud Quality Gate passed! |
SonarCloud Quality Gate failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@pavel-mikula-sonarsource can you merge this? lack of coverage is due to 3 lines of defensive programming. |
Fixes #6438