3 ms·
Microsoft runs internally similar tools. The usual deal is that grandfathered issues (ie. issues found by new code analysis tools on old code base) are generall
by rusanu 10y ago
Microsoft runs internally similar tools. The usual deal is that grandfathered issues (ie. issues found by new code analysis tools on old code base) are generally not fixed, and the warning is instead silenced (all tools have means to suppress specific warning for specific code place). This is done because the risk to fix a code analysis issue on old code base is often higher than the benefit.
New code on the other hand is usually required to pass all static analysis without introducing new warnings, and is often enforced by automated code review (bots that runs static analysis will mark the code review and it will not be possible to check it in).
From time to time some teams form to work on fixing static analysis code warnings on old code, but is not a high priority. Of course a public PR event like the OP may trigger some action, is going to be up to the individual team priorities, policy, schedule, workload etc.
This may sound like laziness or carelessness, but these are good engineers with plenty of experience that are capable of judging risk vs. benefits. If the code was like this for years and no actual bug was reported, is not always worth modifying it. Eric Lippert has a nice blog about How many Microsoft employees does it take to change a lightbulb? [0] and why some of these 'trivial' changes for a small project add up to a risky change at MS scale.
- [0] https://blogs.msdn.microsoft.com/ericlippert/2003/10/28/how-many-microsoft-employees-does-it-take-to-change-a-lightbulb/ https://blogs.msdn.microsoft.com/ericlippert/2003/10/28/how-...
- rusanu 10y ago- StyleCop https://en.wikipedia.org/wiki/StyleCop https://en.wikipedia.org/wiki/StyleCop - FxCop https://en.wikipedia.org/wiki/FxCop https://en.wikipedia.org/wiki/FxCop - Prefast https://msdn.microsoft.com/en-us/library/d3bbz7tz.aspx https://msdn.microsoft.com/en-us/library/d3bbz7tz.aspx - Code Analysis Check-In policies https://msdn.microsoft.com/en-us/library/ms182075.aspx https://msdn.microsoft.com/en-us/library/ms182075.aspx There are more tools like these and at the time I left there were still more popping up. I hated StyleCop, the Tabs vs. Spaces Sillicon Valley episode is very relevant for my relation with StyleCop...