Skip to content

Commit

Permalink
Add PermissionSet object
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurvdv committed Jan 3, 2024
1 parent 60b39f4 commit 0edefde
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Design/Rule0016CheckForMissingCaptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public override void Initialize(AnalysisContext context)
SymbolKind.Field,
SymbolKind.Action,
SymbolKind.EnumValue,
SymbolKind.Control
SymbolKind.Control,
SymbolKind.PermissionSet
);

private void CheckForMissingCaptions(SymbolAnalysisContext context)
Expand Down Expand Up @@ -93,6 +94,13 @@ private void CheckForMissingCaptions(SymbolAnalysisContext context)
if (CaptionIsMissing(context.Symbol, context))
RaiseCaptionWarning(context);
}
else if (context.Symbol.Kind == SymbolKind.PermissionSet)
{
IPropertySymbol assignableProperty = context.Symbol.GetProperty(PropertyKind.Assignable);
if (assignableProperty == null || (bool)assignableProperty.Value)
if (CaptionIsMissing(context.Symbol, context))
RaiseCaptionWarning(context);
}
else
{
if (CaptionIsMissing(context.Symbol, context))
Expand Down

0 comments on commit 0edefde

Please sign in to comment.