Skip to content

[fix-finder] Remove unused using directives in CalculateLayoutCodeBehind.cs #12174

Description

@github-actions

Problem

CalculateLayoutCodeBehind.cs declares two using directives that are never referenced. Removing them reduces noise and keeps the file's imports accurate.

Location

  • File(s): src/Xamarin.Android.Build.Tasks/Tasks/CalculateLayoutCodeBehind.cs
  • Line(s): 4 and 9

Current Code

using System;
using System.Collections.Concurrent;   // line 4 - unused
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;                 // line 9 - unused
using System.Xml;
using System.Xml.XPath;

Neither namespace is used:

  • No Concurrent* types (ConcurrentDictionary, etc.) appear anywhere in the file.
  • Nothing from System.Threading is used. The only asynchronous return type, System.Threading.Tasks.Task on RunTaskAsync (), is written fully qualified and therefore does not require using System.Threading;.

Suggested Fix

Delete the two unused directives:

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.XPath;

Leave all remaining using directives (including the Microsoft.* and Microsoft.Android.Build.Tasks ones) intact.

Guidelines

  • Follow dotnet/android formatting conventions (tabs, Mono style).
  • Do not reorder or otherwise touch the remaining directives; only remove the two unused lines to keep the diff minimal.

Acceptance Criteria

  • using System.Collections.Concurrent; and using System.Threading; removed from CalculateLayoutCodeBehind.cs
  • All tests pass
  • No new warnings introduced

Fix-finder metadata

  • Script: 06-unused-using-directives
  • Score: 30/30 (actionability: 10, safety: 10, scope: 10)

Generated by Nightly Fix Finder · 64.4 AIC · ⌖ 17.2 AIC · ⊞ 9.4K ·

  • expires on Jul 26, 2026, 2:25 AM UTC

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions