SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

SwiftUI: Prefer scaledToFit()/scaledToFill() over aspectRatio(contentMode:)

Open ikelax opened this issue 1 year ago • 1 comments

Adresses #5713.

ikelax avatar Aug 22 '24 21:08 ikelax

1 Warning
:warning: If this is a user-facing change, please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
17 Messages
:book: Linting Aerial with this PR took 0.84s vs 0.82s on main (2% slower)
:book: Linting Alamofire with this PR took 1.15s vs 1.17s on main (1% faster)
:book: Linting Brave with this PR took 6.76s vs 6.85s on main (1% faster)
:book: Linting DuckDuckGo with this PR took 4.28s vs 4.34s on main (1% faster)
:book: Linting Firefox with this PR took 10.21s vs 10.54s on main (3% faster)
:book: Linting Kickstarter with this PR took 9.12s vs 8.8s on main (3% slower)
:book: Linting Moya with this PR took 0.48s vs 0.48s on main (0% slower)
:book: Linting NetNewsWire with this PR took 2.37s vs 2.28s on main (3% slower)
:book: Linting Nimble with this PR took 0.7s vs 0.69s on main (1% slower)
:book: Linting PocketCasts with this PR took 7.82s vs 7.83s on main (0% faster)
:book: Linting Quick with this PR took 0.4s vs 0.4s on main (0% slower)
:book: Linting Realm with this PR took 4.34s vs 4.42s on main (1% faster)
:book: Linting Sourcery with this PR took 2.18s vs 2.14s on main (1% slower)
:book: Linting Swift with this PR took 4.15s vs 4.09s on main (1% slower)
:book: Linting VLC with this PR took 1.15s vs 1.13s on main (1% slower)
:book: Linting Wire with this PR took 16.75s vs 16.4s on main (2% slower)
:book: Linting WordPress with this PR took 10.56s vs 10.49s on main (0% slower)

Here's an example of your CHANGELOG entry:

* SwiftUI: Prefer scaledToFit()/scaledToFill() over aspectRatio(contentMode:).  
  [ikelax](https://github.com/ikelax)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

Generated by :no_entry_sign: Danger

SwiftLintBot avatar Aug 22 '24 21:08 SwiftLintBot