Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What Replaces Code Analysis in Visual Studio 2019?

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:

enter image description here

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?

like image 844
bubbleking Avatar asked Apr 09 '19 17:04

bubbleking


People also ask

What's new in Visual Studio 2019?

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.

What is code analysis in Visual Studio?

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.

How do I suppress code analysis errors in Visual Studio 2019?

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.

Does code analysis work in vs 2022?

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.


1 Answers

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

like image 141
Paulo Morgado Avatar answered Sep 24 '22 14:09

Paulo Morgado