Repository navigation
Fix SwiftLint 0.65 legacy_swiftui_aspect_ratio violation - #184
Open
Vincent Peng (vincent-peng) wants to merge 1 commit into
Open
Vincent Peng (vincent-peng) wants to merge 1 commit into
Vincent Peng (vincent-peng) wants to merge 1 commit into
Conversation
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)
requested review from
a team
and
a balanced review from Copilot
October 9, 2026 00:52
Vincent Peng (vincent-peng)
added a commit
to vincent-peng/SwiftStreamingMarkdown
that referenced
this pull request
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.aspectRatio(contentMode: .fit)with.scaledToFit()inPinchZoomView— the calls are identical (scaledToFit()is shorthand foraspectRatio(nil, contentMode: .fit)).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 --strictgoes from 1 serious violation to 0 across all 146 files.Test plan
swiftlint --strict— clean on 0.65.1Generated with Devin