Skip to content

Commit 9860a90

Browse files
committed
Remove nullability attributes
1 parent 9d24f59 commit 9860a90

File tree

3 files changed

+5
-159
lines changed

3 files changed

+5
-159
lines changed

src/Tools/LeanCode.CodeAnalysis/Analyzers/EnsureCommandValidatorsFollowNamingConvention.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private static void AnalyzeSymbol(SyntaxNodeAnalysisContext context)
3939

4040
if (TryGetCommandValidator(type, out var commandValidator))
4141
{
42-
var expectedName = GetCommandValidatorExpectedName(commandValidator);
42+
var expectedName = GetCommandValidatorExpectedName(commandValidator!);
4343

4444
if (type.Name != expectedName)
4545
{
@@ -61,10 +61,7 @@ internal static string GetCommandValidatorExpectedName(INamedTypeSymbol commandV
6161
);
6262
}
6363

64-
private static bool TryGetCommandValidator(
65-
INamedTypeSymbol type,
66-
[NotNullWhen(true)] out INamedTypeSymbol? commandValidator
67-
)
64+
private static bool TryGetCommandValidator(INamedTypeSymbol type, out INamedTypeSymbol? commandValidator)
6865
{
6966
var validator = GetImplementedValidator(type);
7067

src/Tools/LeanCode.CodeAnalysis/Analyzers/SuggestCommandsHaveValidators.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ private static void AnalyzeSymbol(SyntaxNodeAnalysisContext context)
4545

4646
var tree = type.DeclaringSyntaxReferences.First().SyntaxTree;
4747

48-
if (!CommandIsValidated(commandType, tree, context.SemanticModel))
48+
if (!CommandIsValidated(commandType!, tree, context.SemanticModel))
4949
{
50-
var diagnostic = Diagnostic.Create(Rule, type.Locations[0], commandType.Name);
50+
var diagnostic = Diagnostic.Create(Rule, type.Locations[0], commandType!.Name);
5151
context.ReportDiagnostic(diagnostic);
5252
}
5353
}
5454

55-
private static bool IsCommandHandler(INamedTypeSymbol type, [NotNullWhen(true)] out INamedTypeSymbol? commandType)
55+
private static bool IsCommandHandler(INamedTypeSymbol type, out INamedTypeSymbol? commandType)
5656
{
5757
var handler = type.AllInterfaces.FirstOrDefault(i => i.GetFullNamespaceName() == HandlerTypeName);
5858

src/Tools/LeanCode.CodeAnalysis/NetStandard21Compatibility/System.Diagnostics.CodeAnalysis.NullableAttributes.cs

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)