From c3ce8135fcffbd8285cd361f268eab59ce3da0a5 Mon Sep 17 00:00:00 2001 From: John Zabroski Date: Tue, 11 Nov 2025 19:56:25 -0500 Subject: [PATCH] Fixes #372 Add --verbosity diagnostic flag option for debugging "Error: No files found matching glob pattern." --- src/CodeCoverageSummary/CommandLineOptions.cs | 3 +++ src/CodeCoverageSummary/Program.cs | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/CodeCoverageSummary/CommandLineOptions.cs b/src/CodeCoverageSummary/CommandLineOptions.cs index f525a9f..be0956e 100644 --- a/src/CodeCoverageSummary/CommandLineOptions.cs +++ b/src/CodeCoverageSummary/CommandLineOptions.cs @@ -42,5 +42,8 @@ public class CommandLineOptions [Option(longName: "thresholds", Required = false, HelpText = "Threshold percentages for badge and health indicators, lower threshold can also be used to fail the action.", Default = "50 75")] public string Thresholds { get; set; } + + [Option(longName: "verbosity", Required = false, HelpText = "Logging level - diagnostic or none", Default = "none")] + public string Verbosity { get; set; } } } diff --git a/src/CodeCoverageSummary/Program.cs b/src/CodeCoverageSummary/Program.cs index f0cc63f..28e6b63 100644 --- a/src/CodeCoverageSummary/Program.cs +++ b/src/CodeCoverageSummary/Program.cs @@ -28,6 +28,12 @@ private static int Main(string[] args) if (matchingFiles?.Any() == false) { + if (string.Equals(o.Verbosity, "diagnostic", StringComparison.OrdinalIgnoreCase)) + { + Matcher matcher = new(); + IEnumerable matchingFiles = matcher.GetResultsInFullPath("."); + Console.WriteLine($"Files available in search path: {string.Join(Environment.NewLine, matchingFiles)}"); + } Console.WriteLine("Error: No files found matching glob pattern."); return -2; // error }