From c60ec968f7bc88f653d8edcef151ab4b07b60b27 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort Date: Thu, 11 Jan 2024 14:44:57 +0100 Subject: [PATCH] Probarly need to contine running --- Design/Rule0012DoNotUseObjectIdInSystemFunctions.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Design/Rule0012DoNotUseObjectIdInSystemFunctions.cs b/Design/Rule0012DoNotUseObjectIdInSystemFunctions.cs index 8b1fcf22..850763a0 100644 --- a/Design/Rule0012DoNotUseObjectIdInSystemFunctions.cs +++ b/Design/Rule0012DoNotUseObjectIdInSystemFunctions.cs @@ -41,7 +41,6 @@ private void CheckForObjectIdsInFunctionInvocations(OperationAnalysisContext con IInvocationExpression operation = (IInvocationExpression)context.Operation; RelevantFuntion CurrentFunction = FunctionCallsWithIDParamaters.RelevantFunctions.FirstOrDefault(o => (o.ObjectType.ToString().ToUpper() == operation.TargetMethod.ContainingSymbol.Name.ToUpper() && o.FunctionName == operation.TargetMethod.Name)); - if (CurrentFunction == null) return; SyntaxKind[] AllowedParameterKinds = { SyntaxKind.MemberAccessExpression, SyntaxKind.IdentifierName, SyntaxKind.InvocationExpression, SyntaxKind.QualifiedName }; if (operation.TargetMethod.Parameters.Length != 0 && !AllowedParameterKinds.Contains(operation.Arguments[0].Syntax.Kind) && (operation.Arguments[0].Syntax.ToString() != "0" || !CurrentFunction.ZeroIDAllowed))