Skip to content

Commit

Permalink
Also raise the rule on RecordRef objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurvdv committed Dec 7, 2023
1 parent a6f87a5 commit 1dc88e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Design/Rule0040ExplicitlySetRunTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private void AnalyzeRunTriggerParameters(OperationAnalysisContext ctx)

IInvocationExpression operation = (IInvocationExpression)ctx.Operation;
if (operation.TargetMethod.MethodKind != MethodKind.BuiltInMethod) return;
if (operation.Instance?.GetSymbol().GetTypeSymbol().GetNavTypeKindSafe() != NavTypeKind.Record) return;
if (!(operation.Instance?.GetSymbol().GetTypeSymbol().GetNavTypeKindSafe() == NavTypeKind.Record || operation.Instance?.GetSymbol().GetTypeSymbol().GetNavTypeKindSafe() == NavTypeKind.RecordRef)) return;
if (!buildInMethodNames.Contains(operation.TargetMethod.Name.ToLowerInvariant())) return;

if (operation.Arguments.Where(args => SemanticFacts.IsSameName(args.Parameter.Name, "RunTrigger")).SingleOrDefault() == null)
Expand Down

0 comments on commit 1dc88e4

Please sign in to comment.