-
Notifications
You must be signed in to change notification settings - Fork 470
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
Code Analysis misses many issues .net framework CA catches #1948
Comments
|
@mavasani I summarized the state of impacted rules above. |
Thanks for the summary. Is there any action required from me, such as filing individual bugs? |
@Jm-Fox from the steps above, it sounds like the reproducer case (run against a reference repository) would be enough to show the various differences you found, but it doesn't give a good way to know which ones are the most important to you. It might take us a while to get these differences itemized since the process for filing bugs like this is not automated. If you find specific cases that are especially relevant to your projects, it would be good to go ahead and file individual issues for those. |
Thanks @sharwell @Jm-Fox for all the investigations/reports here. We are striving very hard to ensure compatibility between legacy FxCop and FxCop analyzers, especially for rules which are deemed as important to port based on the current dotnet framework guidelines. We are going to schedule testing cycles in the coming months to run both legacy FxCop and FxCop analyzers over real world code and identify differences and work towards fixing them. As @sharwell mentioned above, if you do find any differences that are super important to you OR block migration to FxCop analyzers, kindly file individual issues, with a note on its priority. Tagging @vatsalyaagrawal @jinujoseph as well so we can cost/schedule this testing effort. |
Thanks for the responses; I apologize for the delay. I have created individual git issues for the CA issues that are most important to me / my employer. I will add that CA1031 is of moderate importance to my employer. Should I comment on the existing issue, or should I leave it be? The remaining issues I / my employer are not worried about. While we'd like to see a one-for-one replacement of the FxCop nuget package for the old code analysis, the remaining issues are not reasons to avoid .net core. |
Yep, many of the fundamental issues are missing. |
Closing this issue as the recommendation is to file separate issues for each rule OR comment on existing issues for a rule. |
Analyzer package
Microsoft.CodeAnalysis.FxCopAnalyzers
Package Version
v2.6.2
Diagnostic ID
Only in .net framework:
Only in .net core*:
*I do not mind new CA issues being introduced to .net core; in fact I support it. However, old CA issues being lost is not acceptable to my employer.
Repro steps
Expected behavior
Each CA warning should appear twice: once in the .net framework 4.6.1 project and once in the .net core project.
Actual behavior
Many CA warnings appear only in the .net framework 4.6.1 project.
Other notes
I don't have a proper repro for CA1062, but this is another one that appears to be missing in .net core that is fairly important.
I apologize if this is documented elsewhere or is expected behavior. In my research so far I have not been able to find anything that explains why CA for .net core isn't 1:1 with CA for .net framework.
These issues not showing up in CA for .net core is very important to both me and my employer. Not having automated checks like disposing of IDisposables along all paths can lead to bugs in production if not caught in code review, and this is not something we can reasonably ask our code reviewers to catch 100% of the time without CA assistance.
Also the repro I have given is just a sample of CA inconsistencies I found by accident. I have no reason to believe there aren't other CA issues that are missing in .net core, and given what I've seen I expect that I'm missing some.
Other questions
The text was updated successfully, but these errors were encountered: