< Summary

Information
Class: DirectSight.Program
Assembly DirectSight
File(s): /home/runner/work/DirectSight/DirectSight/DirectSight/Program.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 41
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
Main(...)50%22100%
NormalizeArgs(...)100%11100%

File(s)

/home/runner/work/DirectSight/DirectSight/DirectSight/Program.cs

#LineLine coverage
 1using System.Linq;
 2using System.Globalization;
 3
 4namespace DirectSight;
 5
 6/// <summary>
 7/// Command line access to the ReportBuilder.
 8/// </summary>
 9public class Program
 10{
 11    /// <summary>
 12    /// The main method.
 13    /// </summary>
 14    /// <param name="args">The command line arguments.</param>
 15    /// <returns>Return code indicating success/failure.</returns>
 16    public static int Main(string[] args)
 217    {
 18        // Force the current thread and all future threads to default to Invariant Culture
 219        CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
 220        CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;
 21
 222        args = NormalizeArgs(args);
 23
 224        var configuration = ReportConfigurationBuilder.Create(args);
 25
 226        var successfulReportGeneration = Generator.GenerateReport(configuration);
 27
 228        return successfulReportGeneration ? 0 : 1;
 229    }
 30
 31    /// <summary>
 32    /// Normalizes the command line arguments.
 33    /// </summary>
 34    /// <param name="args">The command line arguments.</param>
 35    /// <returns>The normalized command line arguments.</returns>
 36    public static string[] NormalizeArgs(string[] args)
 337    {
 1138        var normalizedArgs = args.Select(a => a.Replace(@"""", string.Empty).Trim());
 339        return [.. normalizedArgs];
 340    }
 41}