Docs Menu

Docs HomeMongoDB Analyzer

Analyze Your Code

On this page

  • Overview
  • Use the MongoDB Analyzer From the Command Line

Learn how to use the MongoDB Analyzer to analyze your MongoDB .NET/C# driver code. The MongoDB Analyzer can analyze expressions created with the following patterns:

To run the MongoDB Analyzer from the command line and save your results to a SARIF format file, perform the following actions:

  • Install the MongoDB Analyzer as described in the Install guide.

  • Execute the following command:

dotnet build -property:ErrorLog=<Path to save your MongoDB Analyzer report>

To learn more about dotnet build, see .NET Fundamentals from Microsoft.

To learn more about the ErrorLog setting, see Error and Warning Options from Microsoft.

←  Install the MongoDB AnalyzerAnalyze Builders Expressions →