Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CZEMacLeod committed Sep 24, 2024
2 parents 1fb7778 + fa8d57c commit f02dab6
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sdk": {
"version": "8.0.400",
"rollForward": "latestMajor",
"allowPrerelease": true
"allowPrerelease": false
},
"msbuild-sdks": {
}
Expand Down
15 changes: 15 additions & 0 deletions src/C3D/Extensions/Logging/Xunit/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Style", "IDE0130:Namespace does not match folder structure",
Justification = "Extensions", Scope = "namespace", Target = "~N:C3D.Extensions.Xunit.Logging")]
[assembly: SuppressMessage("Style", "IDE0130:Namespace does not match folder structure",
Justification = "Extensions", Scope = "namespace", Target = "~N:Xunit.Abstractions")]
[assembly: SuppressMessage("Style", "IDE0130:Namespace does not match folder structure",
Justification = "Extensions", Scope = "namespace", Target = "~N:Microsoft.Extensions.Logging")]
[assembly: SuppressMessage("Style", "IDE0130:Namespace does not match folder structure",
Justification = "Pending fs reorg", Scope = "namespace", Target = "~N:C3D.Extensions.Logging.Xunit.Utilities")]
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<IsTestProject>true</IsTestProject>

<PUTDirectory>$(SolutionDir)\src\C3D\Extensions\Logging\Xunit\</PUTDirectory>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
</PropertyGroup>

<ItemGroup>
Expand Down
9 changes: 9 additions & 0 deletions test/C3D/Extensions/Logging/Xunit/Test/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Style", "IDE0130:Namespace does not match folder structure",
Justification = "Assembly name needs to end in .Tests", Scope = "namespace", Target = "~N:C3D.Extensions.Logging.Xunit.Test")]
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private static IConfiguration CreateConfiguration()

}

private ILoggingBuilder ConfigureLogger(ILoggingBuilder builder, IConfiguration configuration) => builder
private static ILoggingBuilder ConfigureLogger(ILoggingBuilder builder, IConfiguration configuration) => builder
.ClearProviders()
.SetMinimumLevel(LogLevel.Debug)
.AddConfiguration(configuration.GetSection("Logging"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void CreateLoggerFiltersMessages()

var messages = wrapper.Messages;

Assert.Collection(messages, s => s.EndsWith(info));
Assert.Single(messages, s => s.EndsWith(info));
}

[Fact]
Expand Down

0 comments on commit f02dab6

Please sign in to comment.