wordpress-mobile / WordPress-iOS

WordPress for iOS - Official repository
http://ios.wordpress.org/
GNU General Public License v2.0
3.7k stars 1.12k forks source link

Remove last `if let strongSelf = self` usages #23836

Open mokagio opened 4 days ago

mokagio commented 4 days ago

Fixes #19549 — I'm working through the iOS Core project, to consolidate into a project in the Automattic org. This task was simpler to address than to migrate. Not really a 2-minute task, but close enough.

To test: Green CI will suffice. Also notice there should be no SwiftLint warnings.

I intentionally opened the PR with the new rule but no fix to verify the linter. Before applying the fixes:

image

Now, the linter is green. See the checks below.

P.S. Sorry for the huuuge diff. I started this out with strongSelf in mind. But since opening the task, SwiftLint upgraded the rule to include all optional binding. There were two strongSelf instances left which made me think it be a small little PR. But there were hundreds more if let x = x around the codebase. 😓

Regression Notes

  1. Potential unintended areas of impact N.A.

  2. What I did to test those areas of impact (or what existing automated tests I relied on) N.A.

  3. What automated tests I added (or what prevented me from doing so) N.A.

PR submission checklist:

N.A.

Testing checklist:

wpmobilebot commented 4 days ago
WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23836-ca3718e
Version25.4.2
Bundle IDorg.wordpress.alpha
Commitca3718ef441aea6c0afcc172a50754c3cc0e3ed5
App Center BuildWPiOS - One-Offs #11091
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
dangermattic commented 4 days ago
2 Warnings
:warning: View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
:warning: This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

wpmobilebot commented 4 days ago
Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23836-ca3718e
Version25.4.2
Bundle IDcom.jetpack.alpha
Commitca3718ef441aea6c0afcc172a50754c3cc0e3ed5
App Center Buildjetpack-installable-builds #10131
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.