Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@onevcat
Copy link
Owner

@onevcat onevcat commented Nov 25, 2025

Summary

  • keep the public API untouched by collecting Swift member-access usage internally and mapping it back to resource keys
  • add SwiftMemberAccessSearchRule plus a fixture to prove that .icFoo usages are preserved while real unused assets are still detected

Thanks to #83 and @duckSern1108 for surfacing the problem—I prefer solving it with this PR so we address the reported issue without changing the API surface.

Testing

  • swift test

Add `generatedAssetSymbolKey` extension to `String` to convert
resource names into Swift asset symbols. Update `unusedFiles`
to detect asset usage through member access patterns in Swift
code. Add `SwiftMemberAccessSearchRule` to match asset symbols
like `.icFlag` or `UIImage.icFlag`. Include tests for new
functionality using fixture files.
Introduce test cases for the SwiftMemberAccessSearchRule to ensure it
correctly processes generated symbols and ignores regular property
access. This enhancement improves test coverage and validates that the
search rule correctly identifies image-related symbols within Swift
code, particularly those that rely on member access patterns.
duckSern1108 and others added 2 commits November 25, 2025 17:53
…sset-member-access-add-test

Update test case for generated asset symbol
@onevcat onevcat merged commit 419a8aa into master Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants