-
Notifications
You must be signed in to change notification settings - Fork 227
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
Fix S3881: Rule should not fail on partial classes #416
Comments
Hi @nnpcYvIVl! Could you manage to create some small reproducer? Or at worst to share with us the class where this happens (you can send us a direct email if you are concerned about the privacy of your code). Cheers, |
It's a large project and I haven't been able to create a small repro. I'll keep trying but for now here is the stack trace.
|
Hi @nnpcYvIVl, |
Hi again @nnpcYvIVl, |
Repro code sent to your email. |
Hi @nnpcYvIVl, I still cannot reproduce the error with your code example. I have tried with VS2015 and VS2017. Could you tell me the exact steps using your repro case to have the issue? Also which version of the SonarLint for Visual Studio are you using? |
To reproduce the warning simply open the solution file and within a second or two it will show in the error list. I'm not sure if this matters but you may want to check the following setting "Settings/Text Editor/C#/Advanced/Enable full solution analysis". It is not on by default but I normally keep it enabled. Here is my version information: Microsoft Visual Studio Enterprise 2017 SonarLint for Visual Studio 3.1.1.1583 |
@nnpcYvIVl Issue reproduced and will be fixed for next release (6.3). Thanks for the feedback! |
Thanks! |
Description
This error is thrown during analysis: AD0001 Analyzer 'SonarAnalyzer.Rules.CSharp.ImplementIDisposableCorrectly' threw an exception of type 'System.ArgumentException' with message 'Syntax node is not within syntax tree'.
Related information
The text was updated successfully, but these errors were encountered: