-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Description
- Operating system: Microsoft Visual Studio Community 2022 (64-Bit) - Current
Version 17.7.0 - SonarLint plugin version: 9.8.0.76515
- Programming language you're coding in: C#
- Is connected mode used: No
- Link to SonarCommunity
Hello,
we use SonarLint with StyleCop in our company. Because there are many small warning that could be autofixed on save, we use the feature "clean-code on save".
Here is the problem:
The Autofix of S1125 is wrong. The rule and the description are definitely correct, but the autofix function is wrong. It changes if (testBool == false) to if (testBool). Screenshot are attached.
This is the fix:
Autofix should have this result:
if (!testBool)
We had some bugs because SonarLint changed it wrong and is missing the exclamation mark on negative boolean literals. Could you please fix this? We will use the rule quick then again. Thank you! :slight_smile:
tnoiretisa, rudym87, AdCodicem, jeppevammenkristensen, p1luz and 1 more
Metadata
Metadata
Assignees
Labels
Code FixAnything related to Code FixesAnything related to Code Fixes