Commit e9e8600
Enable SwiftLint rule: empty_count (#25434)
* Enable SwiftLint rule: empty_count
Prefer checking `isEmpty` over comparing `count` to zero.
Part of the Orchard SwiftLint rollout campaign.
---
Generated with the help of Claude Code, https://code.claude.com
Co-Authored-By: Claude Code Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix false positive on AggregatedDataPoint
`AggregatedDataPoint.count` is an `Int` property, not a collection count.
Revert to `.count != 0` with inline disable.
---
Generated with the help of Claude Code, https://claude.ai/code
Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
* Fix 4 more empty_count false positives
Non-collection types with a `.count` property but no `.isEmpty`:
- `ReaderInterestsDataSource`
- `AnyTermWithViewContext`
- `NSMutableOrderedSet`
- Tuple `(count: Int, difference: Int, percentage: Int)`
Found via Jetpack CI build — these targets aren't compiled by the WordPress scheme locally.
---
Generated with the help of Claude Code, https://claude.ai/code
Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
* Fix 3 more empty_count false positives
`NSMutableArray` and `UIViewController`-typed `self` in closures have no `.isEmpty`.
All 3 in `ReaderStreamViewController.swift`.
---
Generated with the help of Claude Code, https://claude.ai/code
Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
* Fix NSSet empty_count false positive
`NSSet` has no `.isEmpty` — revert to `.count == 0`.
---
Generated with the help of Claude Code, https://claude.ai/code
Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Code Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 133a907 commit e9e8600
102 files changed
Lines changed: 169 additions & 157 deletions
File tree
- Modules
- Sources
- JetpackStats
- Charts
- Screens
- Services/Mocks
- Views/TopList/Rows
- UITestsFoundation/Screens
- WordPressIntelligence/Utilities
- WordPressKit
- Tests
- JetpackStatsTests
- Sources
- WordPressAuthenticator
- Extensions
- Features/SignIn
- Helpers/UnifiedAuth/ViewRelated/2FA
- Views
- WordPressData/Swift
- Tests
- KeystoneTests/Tests
- Features/Media
- StockPhotos
- Tenor
- Services
- Utility
- WordPressDataTests
- WordPressKitTests/WordPressKitTests/Tests
- WordPress
- Classes
- Extensions
- Jetpack/JetpackMigration
- Done
- Stores
- System
- Utility
- BackgroundTasks
- Blogging Reminders
- ImmuTable
- Sharing
- Universal Links
- Migration
- ViewRelated
- Aztec/ViewControllers
- Blog
- Blog Dashboard/Cards
- Blog Details
- BloggingReminders
- Sharing
- Domains
- Domain registration/RegisterDomainDetails/ViewController
- View Models
- Gutenberg
- Layout Picker
- Utils
- Jetpack/Jetpack Scan
- View Models
- Media
- SiteMedia
- Controllers
- StockPhotos
- Tenor
- Me/All Domains/View Models
- NUX/Controllers/Social Signup
- Notifications/Controllers
- NotificationsViewController
- People/Controllers
- Plugins/ViewModels
- Post
- Categories
- Controllers
- Publishing/Views
- Reader
- Controllers
- Select Interests
- Views
- Stats
- Charts
- Insights
- Insights Management
- Period Stats
- Suggestions
- Tags
- Tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
0 commit comments