From eba5ca46db5ec78d7c44f924224f044d5e8eeb8b Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Fri, 23 Feb 2024 07:48:44 +0000 Subject: [PATCH] Output formatted instead of minified sarif (#577) Fix #576 --- AppInspector.CLI/Writers/AnalyzeSarifWriter.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/AppInspector.CLI/Writers/AnalyzeSarifWriter.cs b/AppInspector.CLI/Writers/AnalyzeSarifWriter.cs index 83d5e4f8..09caadd6 100644 --- a/AppInspector.CLI/Writers/AnalyzeSarifWriter.cs +++ b/AppInspector.CLI/Writers/AnalyzeSarifWriter.cs @@ -285,6 +285,7 @@ public override void WriteResults(Result result, CLICommandOptions commandOption // The provided schema (rtm.6) is 404, so replace it with a 2.1.0 that is available. reReadLog["$schema"] = "https://www.schemastore.org/schemas/json/sarif-2.1.0-rtm.5.json"; using var jsonWriter = new JsonTextWriter(TextWriter); + jsonWriter.Formatting = Formatting.Indented; reReadLog.WriteTo(jsonWriter); // Add a newline at the end to make logging messages cleaner TextWriter.WriteLine();