-
Notifications
You must be signed in to change notification settings - Fork 509
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
Improved implementation of VerifyFixAsync that will ignore diagnostics… #935
Improved implementation of VerifyFixAsync that will ignore diagnostics… #935
Conversation
…s for which code fixes are not available
Running this will result in 16 failed tests. See also #936 |
The behavior of this change does not match the behavior of the IDE for the same code fixes. While the code fix creates separate |
I implemented a workaround for #936. It is my opinion that there was nothing wrong with the code to begin with. The fact that the IDE merges two tokens is an implementation detail of Roslyn and our code should not depend on that. I added the workaround to removing a blocking factor for this PR. Given the complexity of the code affected by #936, it seemed a better solution to me to add a workaround for now. |
At first glance, the workaround is exactly what I had in mind. 😄
💭 In an ideal world, the analyzers would treat equivalent representations of the source code in an equivalent manner. I'm comfortable knowing that we have regression tests in place to alert us to any change in the representation of the comments provided by Roslyn that would impact the behavior of the analyzers. |
This commit removes an explicit text comparison in favor of a duplicate diagnostics detection which was already being computed anyway. It also uses Document.WithText instead of constructing a whole new Document instance.
Tweak changed document detection
That was a big improvement. Commit e0304de took 8:17 minutes on AppVeyor, but the updated commit bb9cee1 to only 6:50 minutes. It's still slower than prior to this pull request but not as much slower. Hopefully performance improvements to xunit can improve this more in the future. |
Improved implementation of VerifyFixAsync that will ignore diagnostics…
… for which code fixes are not available.