-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCSharpVerifierHelper.cs
More file actions
30 lines (29 loc) · 1005 Bytes
/
CSharpVerifierHelper.cs
File metadata and controls
30 lines (29 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Collections.Immutable;
using Microsoft.CodeAnalysis;
namespace CustomCode_Analyzer.Tests
{
// Helper class to configure nullable reference type warnings
public static class CSharpVerifierHelper
{
// Dictionary of nullable warning configurations
public static ImmutableDictionary<string, ReportDiagnostic> NullableWarnings
{
get
{
return ImmutableDictionary.CreateRange(
[
// Configure specific nullable warning codes as errors
new KeyValuePair<string, ReportDiagnostic>(
"CS8632",
ReportDiagnostic.Error
),
new KeyValuePair<string, ReportDiagnostic>(
"CS8669",
ReportDiagnostic.Error
),
]
);
}
}
}
}