Skip to content

Improved SwiftUI View Detection

Latest

Choose a tag to compare

@swiftlysingh swiftlysingh released this 13 May 21:00

What’s Changed

  • SwiftUI View Filtering:
    The bot now only processes Swift files that both import SwiftUI and declare a struct conforming to the View protocol (e.g., struct MyView: View).
    This prevents non-view files (such as models or utilities) from being unnecessarily processed, making the action more efficient and accurate.

  • Internal Improvements:

    • Updated the file detection logic in the entrypoint script to use a two-step grep for both import SwiftUI and struct ...: View.
    • No changes to the accessibility logic or output format.

Upgrade Notes

  • No action required for users.
  • The action will now skip Swift files that do not contain SwiftUI views, reducing noise and irrelevant PRs.