Skip to content

Commit

Permalink
Merge pull request #374 from StefanMaron/development
Browse files Browse the repository at this point in the history
Exclude FlowFilter and specific types for LC0035
  • Loading branch information
Arthurvdv authored Nov 27, 2023
2 parents b0e0bc5 + f332dc4 commit dd760a1
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 dd760a1

Please sign in to comment.