< Summary

Information
Class: Punch.CLI.Program
Assembly: punch
File(s): /home/runner/work/punch/punch/src/Punch.CLI/Program.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 17
Coverable lines: 17
Total lines: 32
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Main(...)0%620%

File(s)

/home/runner/work/punch/punch/src/Punch.CLI/Program.cs

#LineLine coverage
 1using System.Text;
 2using Spectre.Console.Cli;
 3
 4namespace Punch.CLI;
 5
 6class Program
 7{
 8    static int Main(string[] args)
 09    {
 10        // Windows consoles default to a legacy OEM code page that can't encode
 11        // the timeline tick (╵) and gauge (▰▱) glyphs, rendering them as '?'.
 012        if (OperatingSystem.IsWindows())
 013        {
 14            try
 015            {
 016                Console.OutputEncoding = Encoding.UTF8;
 017            }
 018            catch (IOException)
 019            {
 20                // No console attached (e.g. redirected output); keep the default.
 021            }
 022        }
 23
 024        var app = new CommandApp<PunchCommand>();
 025        app.Configure(config =>
 026        {
 027            config.SetApplicationName("punch");
 028        });
 29
 030        return app.Run(args);
 031    }
 32}

Methods/Properties

Main(System.String[])