mirror of
https://github.com/yaakov-h/Notepad.Extensions.Logging.git
synced 2025-04-19 02:35:12 +00:00
Introduce code analysis, clean up code to comply
This commit is contained in:
parent
895ef8c01e
commit
1116c4b54c
12 changed files with 231 additions and 42 deletions
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
|
@ -6,8 +6,20 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.4" />
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="WTG.Analyzers" Version="2.10.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -6,13 +6,13 @@ namespace Notepad.Extensions.Logging.FunctionalTest
|
|||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
static void Main()
|
||||
{
|
||||
var sc = new ServiceCollection();
|
||||
sc.AddLogging(lb =>
|
||||
{
|
||||
lb.AddConsole();
|
||||
lb.AddNotepad();
|
||||
lb.AddNotepad(o => o.WindowName = "mylog - Notepad++");
|
||||
});
|
||||
|
||||
var sp = sc.BuildServiceProvider();
|
||||
|
@ -29,7 +29,7 @@ namespace Notepad.Extensions.Logging.FunctionalTest
|
|||
{
|
||||
throw new InvalidOperationException("Wheeeeeeee");
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
return ex;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue