Skip to content

Commit

Permalink
Merge pull request #412 from StefanMaron/development
Browse files Browse the repository at this point in the history
Also raise rule0040 on RecordRef objects
  • Loading branch information
Arthurvdv authored Dec 7, 2023
2 parents a49cf27 + 1dc88e4 commit 8f889f2
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 8f889f2

Please sign in to comment.