I'm toying with getting our team and projects ready for VS 2019. Right away, trying to set up Code Analysis for a new project, I find this:
So, if this is deprecated (and apparently can't even be used, so I'm thinking "deprecated" really means "gone"), where are we supposed to set up our Rule Sets? Is there some other location, or perhaps an altogether new solution to the problem of style and code quality?
New Code Analysis Checks in Visual Studio 2019: use-after-move and coroutine. Visual Studio 2019 Preview 2 is an exciting release for the C++ code analysis team. In this release, we shipped a new set of experimental rules that help you catch bugs in your codebase, namely: use-after-move and coroutine checks.
The Code Analysis feature of Visual Studio performs static code analysis to help developers identify potential design, globalization, interoperability, performance, security, and a host of other categories of potential problems.
If you want to clear analyzer errors from the Error List, you can suppress all the current violations by selecting Analyze > Run Code Analysis and Suppress Active Issues on the menu bar. For more information, see Suppress violations. Starting in Visual Studio 2019 version 16.3, you can turn off source code analysis or execute it on demand.
In addition, if I open a project that has code analysis enabled in VS 2019, that same project in VS 2022 greys-out all my [SuppressMessage] attributes and doesn't give me the original CA warning if I remove them. It doesn't seem like code analysis is even running in VS 2022.
Going forward, static analysis will be provided by Roslyn analyzers: https://github.com/dotnet/roslyn-analyzers
Migrate from FxCop code analysis to .NET compiler platform analyzers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With