Command Line Interface - SergeyTeplyakov/ErrorProne.NET GitHub Wiki

Command Line Interface

ErrorProne.NET has built-in tool to run analyzers from the command line. This can help to integrate with custom build process and help to analyze project that are not migrated to VS2015 yet.

How to use?

ErrorProne.NET.Cli.exe /?
 -s, --solution    Required. Path to solution to analyzer
 -l, --log         Log file where diagnostic information would be stored
 -i, --info        (Default: True) Enable information-level diagnostics
 -d, --disable     List of diagnostics that should be excluded from the
                   analysis.

So you may specify solution and press 'Enter' and you'll get all diagnostics. (Yep, you whould be able to disable some of them via -d switch, but it's not working yet).

To understand how long it should take: it takes about 3 minutes to analyze Roslyn solution on my laptop. So the analysis is pretty fast.

Samples

Debug\ErrorProne.NET.Cli.exe -s D:\Sources\GitHub\roslyn\compilers.sln -l Roslyn.txt -d ERP022 ERP023

This means: run analysis on Roslyn codebase, save results to Roslyn.txt and disable diagnostics ERP022 (swallowing exception) and ERP023 (incorrect exception observation).