< Summary

Information
Class: GistBackend.Program
Assembly: GistBackend
File(s): /home/runner/work/the-gist-of-it-sec/the-gist-of-it-sec/backend/GistBackend/Program.cs
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 31
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Main()100%11100%

File(s)

/home/runner/work/the-gist-of-it-sec/the-gist-of-it-sec/backend/GistBackend/Program.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Hosting;
 2using Microsoft.Extensions.Hosting;
 3using Serilog;
 4using Serilog.Events;
 5
 6namespace GistBackend;
 7
 8public static class Program
 9{
 10    public static async Task Main(string[] args)
 11    {
 1012        var builder = Host.CreateDefaultBuilder(args);
 1013        var host = builder.UseSerilog((context, _, configuration) => {
 1014                configuration
 1015                    .ReadFrom.Configuration(context.Configuration)
 1016                    .Enrich.FromLogContext()
 1017                    .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
 1018                    .MinimumLevel.Override("Microsoft.AspNetCore", LogEventLevel.Information)
 1019                    .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Information)
 1020                    .MinimumLevel.Override("Microsoft.Hosting.Lifetime", LogEventLevel.Information)
 1021                    .MinimumLevel.Override("System.Net.Http.HttpClient", LogEventLevel.Warning)
 1022                    .MinimumLevel.Override("System.Net.Http.HttpClient.Default.LogicalHandler", LogEventLevel.Warning)
 1023                    .MinimumLevel.Override("System.Net.Http.HttpClient.Default.ClientHandler", LogEventLevel.Warning)
 1024                    .WriteTo.Console(new Serilog.Formatting.Json.JsonFormatter());
 1025            })
 1026            .ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<StartUp>())
 1027            .Build();
 28
 1029        await host.RunAsync();
 1030    }
 31}

Methods/Properties

Main()