Enable CA1852: Seal internal types (#25890)

This commit is contained in:
xtqqczze
2026-02-23 11:11:12 -08:00
committed by GitHub
parent 19fa6a9f79
commit cfd5966530
3 changed files with 6 additions and 2 deletions
+4
View File
@@ -510,6 +510,10 @@ dotnet_diagnostic.CA1846.severity = warning
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1847
dotnet_diagnostic.CA1847.severity = warning
# CA1852: Seal internal types
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1852
dotnet_diagnostic.CA1852.severity = warning
# CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
# https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1853
dotnet_diagnostic.CA1853.severity = warning
+1 -1
View File
@@ -10,7 +10,7 @@ using System.Runtime.Loader;
namespace Test.Isolated.Init
{
internal class CustomLoadContext : AssemblyLoadContext
internal sealed class CustomLoadContext : AssemblyLoadContext
{
private readonly string _dependencyDirPath;
+1 -1
View File
@@ -20,7 +20,7 @@ namespace TestExe
System = 2,
}
internal class TestExe
internal sealed class TestExe
{
private static int Main(string[] args)
{