Skip to content

Fix SwiftLint 0.65 legacy_swiftui_aspect_ratio violation - #184

Open
Vincent Peng (vincent-peng) wants to merge 1 commit into
microsoft:mainfrom
vincent-peng:lint-aspect-ratio
Open

Vincent Peng (vincent-peng) wants to merge 1 commit into
microsoft:mainfrom
vincent-peng:lint-aspect-ratio

Conversation

@vincent-peng

Copy link
Copy Markdown
Contributor

Summary

  • Replaces .aspectRatio(contentMode: .fit) with .scaledToFit() in PinchZoomView — the calls are identical (scaledToFit() is shorthand for aspectRatio(nil, contentMode: .fit)).
  • CI's SwiftLint job brew-installs the latest release, and SwiftLint 0.65 adds legacy_swiftui_aspect_ratio, which now fails on this pre-existing line — making the lint job red for every PR, not just this one.

Verified locally with SwiftLint 0.65.1 (same version CI installs): swiftlint --strict goes from 1 serious violation to 0 across all 146 files.

Test plan

  • swiftlint --strict — clean on 0.65.1
  • No behavior change — identical modifier shorthand

Generated with Devin

SwiftLint 0.65 adds legacy_swiftui_aspect_ratio and CI brew-installs the
latest release, so this pre-existing call now fails the lint job on every
PR. scaledToFit() is the identical shorthand.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@vincent-peng
Vincent Peng (vincent-peng) requested review from a team and a balanced review from Copilot October 9, 2026 00:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Vincent Peng (vincent-peng) added a commit to vincent-peng/SwiftStreamingMarkdown that referenced this pull request Oct 9, 2026
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.

2 participants