In sample project some of the mentioned Analyzers are included using Nugget Package.
-
Open sln file in Visual Studio 2019, open any controller file. Build the project and wait for few minutes. Some times analyzer output might not show just try 2 to 3 times rebuilding project and wait for few minutes. You can find Analyzers errors in Warning Tab. You can identify warnings are produced from which analzers by checking prefix.
-
You can also enable/disable rules using Rule Set file - CodeAnalysis.ruleset
Cake Build Script - Cake Script File
Sample project also include Cake Script file. You can use Cake Build and integrate in Continuous Integration.
Cake script does the following things
- Build project
- Run static code analyzers.
- Output the warnings and Analyzers report in output file.