Skip to content

[fix-finder] Clean up stale HACK: prefix in ZipArchiveEx.FixupWindowsPathSeparators doc comment #12202

Description

@github-actions

Problem

The XML <summary> for ZipArchiveEx.FixupWindowsPathSeparators starts with HACK: and then describes aapt2 behavior rather than what the method does. This method is a legitimate, permanently-needed workaround (it is actively called from Aapt2LinkAssetPack and BuildArchive), so the HACK: label is misleading. A <summary> should describe the method's behavior; the aapt2 rationale belongs in <remarks>.

Location

  • File(s): src/Xamarin.Android.Build.Tasks/Utilities/ZipArchiveEx.cs
  • Line(s): 168-171

Current Code

		/// <summary>
		/// HACK: aapt2 is creating zip entries on Windows such as `assets\subfolder/asset2.txt`
		/// </summary>
		public void FixupWindowsPathSeparators (Action<string, string> onRename)

Suggested Fix

Rewrite the doc comment so the <summary> describes the method and the aapt2 detail moves into <remarks>:

		/// <summary>
		/// Rewrites zip entry names that use backslash path separators to use forward slashes.
		/// </summary>
		/// <remarks>
		/// aapt2 creates zip entries on Windows with mixed separators such as `assets\subfolder/asset2.txt`,
		/// which must be normalized to forward slashes for a valid archive.
		/// </remarks>
		public void FixupWindowsPathSeparators (Action<string, string> onRename)

Guidelines

  • Comment-only change; do not alter method behavior.
  • Follow dotnet/android formatting conventions (tabs, space before ().

Acceptance Criteria

  • The HACK: prefix is removed from the doc comment.
  • The aapt2 explanation is preserved (in <remarks>).
  • All tests pass.
  • No new warnings introduced.

Fix-finder metadata

  • Script: 00-todo-fixme-hack
  • Score: 30/30 (actionability: 10, safety: 10, scope: 10)

Generated by Nightly Fix Finder · 53.9 AIC · ⌖ 19.8 AIC · ⊞ 9.4K ·

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions