roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

RCS1037: inconsistent behavior for scopes of document/project/solution

Open montoner0 opened this issue 4 years ago • 3 comments
trafficstars

Product and Version Used: Roslynator 2019 v3.2.0 in VS2019 Community and Pro editions 16.10.*

Steps to Reproduce: In this solution the issue is perfectly reproducible on my side https://github.com/aelij/RoslynPad.git (commit 44b73b29d35b9cda7c4d383b96695f621c2be2b3 at the moment of the reproduction)

  1. Open solution
  2. Go to TelemetryProvider.cs in RoslynPad project
  3. Line 26 has the issue with trailing spaces
  4. Try to fix all occurrences in solution.

Actual Behavior: It does nothing in the case of this solution (even preview window doesn't appear). For other cases, sometimes (most of times) it removes some of white-spaces, sometimes it doesn't remove anything, sometimes it removes all of them (at least for the document scope, not sure about project/solution).

Expected Behavior: It should find and remove all occurrences in the selected scope.

montoner0 avatar Jun 25 '21 22:06 montoner0

Hi, I was not able to reproduce the described behavior. When I invoke "Remove trailing white-space" on line 26 in the file TelemetryProvider.cs the preview window does appear after a while and then the fixes are applied (33 files are fixed).

I have VS Community 16.10.2

josefpihrt avatar Jun 29 '21 23:06 josefpihrt

That's quite strange because I can reproduce this on a couple of different machines. Although they have similar VS configuration and extensions set. I'll try to play with settings and/or extensions to see if they're related.

montoner0 avatar Jun 30 '21 08:06 montoner0

I've made a fresh installation of VS 2019 16.10.3 in Windows Sandbox and still see the erratic behavior of this analyzer. Sometimes it finds all issues, sometimes some of them, sometimes none. At some point it even ignored the issue on line 26 and didn't offer a fix in the IntelliSense menu. You could try to cancel the preview window if it works correctly first time and try the search again.

montoner0 avatar Jun 30 '21 22:06 montoner0