-
Notifications
You must be signed in to change notification settings - Fork 1.9k
cs/unused-collection false positive? #14073
Copy link
Copy link
Open
Labels
Description
Hope this is the right place to file analyzer issues as well, didn't really see any info on recommendations for reporting issues anywhere.
We saw a "Container contents are never accessed" error on our report cs/unused-collection: https://github.com/CommunityToolkit/Windows/security/code-scanning/9
Flagging this code in our file:
private List<UIElement> _overflow = new List<UIElement>();But it was used here in our ArrangeOverride method:
/// <inheritdoc/>
protected override Size ArrangeOverride(Size finalSize)
{
// Have grid to the bulk of our heavy lifting.
var size = base.ArrangeOverride(finalSize);
// Make sure all overflown elements have no size.
foreach (var child in _overflow)
{
child.Arrange(default);
}Is this due to the foreach usage or because this is in a framework/platform method that is uncalled by our codebase directly but will be called by the XAML/UWP/WindowsAppSDK platform?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.