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

.NET 8 and C# 12: add repros and UTs for rules starting with P in SonarWay #8082

Merged

Conversation

@antonioaversa antonioaversa force-pushed the antonio/dotnet8-cs12-add-repros-and-uts branch from 1b713aa to 3391bfd Compare September 27, 2023 08:39
@antonioaversa antonioaversa changed the title .NET 8 and C# 12: add repros and UTs .NET 8 and C# 12: add repros and UTs for rules starting with P Sep 27, 2023
@antonioaversa antonioaversa changed the title .NET 8 and C# 12: add repros and UTs for rules starting with P .NET 8 and C# 12: add repros and UTs for rules starting with P in SonarWay Sep 27, 2023
@antonioaversa antonioaversa marked this pull request as ready for review September 27, 2023 08:41
@csaba-sagi-sonarsource
Copy link
Contributor

There is a FN for the following case for PropertiesAccessCorrectField rule.

public class SomeClass(object y)
{
    object x;
    public object Y
    {
        get { return x; }  // FN
        set { x ??= value; } // FN
    }
}

Copy link
Contributor

@csaba-sagi-sonarsource csaba-sagi-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments. Overall nice findings!

@antonioaversa
Copy link
Contributor Author

There is a FN for the following case for PropertiesAccessCorrectField rule.

Good catch! I have added the reproducer to this PR and an issue for it: #8101

Copy link
Contributor

@csaba-sagi-sonarsource csaba-sagi-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left one more comment. you could try to reference the .NET8 assemblies as I suggested since we already have them on the machine or bump the target framework of the UTs.

@antonioaversa
Copy link
Contributor Author

@costin-zaharia-sonarsource taking over from @csaba-sagi-sonarsource

Here is the last thread open: #8082 (comment)

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@costin-zaharia-sonarsource costin-zaharia-sonarsource merged commit 1fd123f into master Sep 29, 2023
@costin-zaharia-sonarsource costin-zaharia-sonarsource deleted the antonio/dotnet8-cs12-add-repros-and-uts branch September 29, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants