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

Improve S2437: message - replace silly with unnecessary #7318

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

antonioaversa
Copy link
Contributor

@antonioaversa antonioaversa added Type: Improvement Area: VB.NET VB.NET rules related issues. Area: C# C# rules related issues. labels Jun 1, 2023
@antonioaversa antonioaversa force-pushed the Antonio/S2437-silly-unnecessary branch from e978a6e to 7924b34 Compare June 1, 2023 09:47
@antonioaversa antonioaversa marked this pull request as ready for review June 1, 2023 11:57
@antonioaversa
Copy link
Contributor Author

Uncovered lines (such as https://sonarcloud.io/code?id=sonaranalyzer-dotnet&pullRequest=7318&selected=sonaranalyzer-dotnet%3Aanalyzers%2Fsrc%2FSonarAnalyzer.CSharp%2FRules%2FUnnecessaryBitwiseOperationCodeFix.cs&line=36) are on existing and unmodified code, in scenarios where the codefix is applied to the wrong node type => not easy to reproduce in a test.

@@ -24,41 +24,41 @@
namespace SonarAnalyzer.UnitTest.Rules
{
[TestClass]
public class SillyBitwiseOperationTest
public class UnnecessaryBitwiseOperationTest

Choose a reason for hiding this comment

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

The name of the file is still SillyBitwiseOperationTest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well spot, fixed!

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM!

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 1, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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

93.2% 93.2% Coverage
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 1, 2023

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

@antonioaversa antonioaversa merged commit 2034ac5 into master Jun 1, 2023
@antonioaversa antonioaversa deleted the Antonio/S2437-silly-unnecessary branch June 1, 2023 13:38
@antonioaversa antonioaversa added this to the 9.3 milestone Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants