Skip to content

Commit

Permalink
Exclude FlowFilter and specific types
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthurvdv committed Nov 27, 2023
1 parent 1809a70 commit f332dc4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Design/Rule0035ExplicitSetAllowInCustomizations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ private void AnalyzeAllowInCustomization(SymbolAnalysisContext ctx)
.Where(x => x.GetBooleanPropertyValue(PropertyKind.Enabled) != false)
.Where(x => x.GetProperty(PropertyKind.AllowInCustomizations) is null)
.Where(x => x.GetProperty(PropertyKind.ObsoleteState) is null)
.Where(x => x.FieldClass != FieldClassKind.FlowFilter)
.Where(x => IsSupportedType(x.OriginalDefinition.GetTypeSymbol().GetNavTypeKindSafe()))
.ToList();
if (!tableFields.Any()) return;

Expand Down Expand Up @@ -102,5 +104,21 @@ private static IEnumerable<IApplicationObjectTypeSymbol> GetRelatedPages(SymbolA
return null;
}
}

private static bool IsSupportedType(NavTypeKind navTypeKind)
{
switch (navTypeKind)
{
case NavTypeKind.Blob:
case NavTypeKind.Media:
case NavTypeKind.MediaSet:
case NavTypeKind.RecordId:
case NavTypeKind.TableFilter:
return false;

default:
return true;
}
}
}
}

0 comments on commit f332dc4

Please sign in to comment.