fix: resolve SwiftFormat CI failures (swiftTestingTestCaseNames, redundantSwiftTestingSuite, and others)#138
Open
fix: resolve SwiftFormat CI failures (swiftTestingTestCaseNames, redundantSwiftTestingSuite, and others)#138
Conversation
Fix 462 SwiftFormat violations across 130 files: - swiftTestingTestCaseNames: remove redundant @suite string names - redundantSwiftTestingSuite: remove @suite with no args - redundantSendable: remove redundant Sendable conformances - redundantGet: remove explicit get accessor - blankLinesBetweenScopes: add blank line before func declarations - semicolons: split multi-statement lines - todos: convert /// TODO: to // TODO:" Agent-Logs-Url: https://github.com/jbcrane13/NetMonitor-2.0/sessions/9fe35655-c8fa-4b73-976a-2482f2157de7 Co-authored-by: jbcrane13 <25068427+jbcrane13@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update NetMonitor configuration file
fix: resolve SwiftFormat CI failures (swiftTestingTestCaseNames, redundantSwiftTestingSuite, and others)
Apr 10, 2026
jbcrane13
approved these changes
Apr 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the codebase to satisfy the existing SwiftFormat configuration (SwiftFormat 0.59+ / Swift 6 mode) and unblock the Lint CI workflow by applying auto-fixable formatting and redundancy rules across tests and a few source files.
Changes:
- Removes/normalizes Swift Testing
@Suite(...)usage (drops redundant labels, removes no-op@Suiteattributes, keeps traits like.serialized). - Removes redundant
Sendableconformances and applies a few small formatting corrections (e.g., redundantget {}, semicolon splitting, blank lines). - Minor comment normalization (e.g.,
/// TODO:→// TODO:) per SwiftFormat rules.
Reviewed changes
Copilot reviewed 130 out of 130 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/NetMonitor-macOSTests/WakeOnLanActionTests.swift | Removes redundant Swift Testing @Suite name. |
| Tests/NetMonitor-macOSTests/UptimeViewModelTests.swift | Drops custom @Suite name and keeps .serialized. |
| Tests/NetMonitor-macOSTests/StatisticsServiceTests.swift | Removes multiple redundant @Suite names. |
| Tests/NetMonitor-macOSTests/ShellPingParserTests.swift | Removes redundant @Suite names for multiple suites. |
| Tests/NetMonitor-macOSTests/ShellPingParserExtendedTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-macOSTests/ShellCommandRunnerTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-macOSTests/NetworkInfoServiceTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-macOSTests/NetworkHealthScoreViewModelTests.swift | Removes redundant @Suite names; preserves @MainActor suites. |
| Tests/NetMonitor-macOSTests/NetworkHealthScoreServiceTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-macOSTests/NetworkDetailViewTests.swift | Drops custom @Suite names; keeps .serialized. |
| Tests/NetMonitor-macOSTests/NetworkDetailViewScanRegressionTests.swift | Drops @Suite string name; keeps .serialized. |
| Tests/NetMonitor-macOSTests/NetMonitor_macOSTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-macOSTests/MonitoringSessionTests.swift | Drops @Suite string name; keeps .serialized. |
| Tests/NetMonitor-macOSTests/MonitoringSessionExtendedTests.swift | Adds blank line; splits semicolon-joined statements; drops @Suite string names while keeping .serialized. |
| Tests/NetMonitor-macOSTests/ISPCardViewModelExtendedTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-macOSTests/ISPCardErrorSurfacingTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-macOSTests/GatewayLatencyFallbackTests.swift | Drops @Suite string name; keeps .serialized. |
| Tests/NetMonitor-macOSTests/DeviceDiscoveryCoordinatorTests.swift | Drops @Suite string name; keeps .serialized. |
| Tests/NetMonitor-macOSTests/DeviceDiscoveryCoordinatorExtendedTests.swift | Drops @Suite string name; keeps .serialized. |
| Tests/NetMonitor-macOSTests/DefaultTargetsProviderTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-macOSTests/DashboardModelsTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-macOSTests/ContinuationTrackerTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-macOSTests/CompanionMessageHandlerTests.swift | Drops @Suite string name; keeps .serialized. |
| Tests/NetMonitor-macOSTests/CompanionMessageHandlerExtendedTests.swift | Drops @Suite string name; keeps .serialized. |
| Tests/NetMonitor-macOSTests/ARPScannerServiceTests.swift | Removes redundant @Suite names for multiple suites. |
| Tests/NetMonitor-iOSTests/WorldPingToolViewModelTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/WiFiInfoServiceCacheTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/WHOISToolViewModelTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/WakeOnLANToolViewModelTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/VPNInfoViewModelTests.swift | Removes redundant @Suite names across suites. |
| Tests/NetMonitor-iOSTests/TracerouteToolViewModelTests.swift | Drops redundant @Suite string name; removes extra suite name for error tests. |
| Tests/NetMonitor-iOSTests/ToolsViewModelTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/TimelineViewModelTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-iOSTests/ThemeTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-iOSTests/TargetManagerTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/TargetManagerExtendedTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/SubnetCalculatorToolViewModelTests.swift | Removes redundant @Suite name for Swift Testing suite section. |
| Tests/NetMonitor-iOSTests/SSLCertificateMonitorViewModelTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-iOSTests/SpeedTestToolViewModelTests.swift | Removes redundant @Suite names across suites. |
| Tests/NetMonitor-iOSTests/SharedViewModelHelpersTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/SettingsViewModelTests.swift | Removes redundant @Suite names across suites. |
| Tests/NetMonitor-iOSTests/ScheduledScanViewModelTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/PostScanRefinementTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/PortScannerToolViewModelTests.swift | Drops redundant @Suite string name; removes extra suite name for error tests. |
| Tests/NetMonitor-iOSTests/PingToolViewModelTests.swift | Drops redundant @Suite string name(s); keeps .serialized where present. |
| Tests/NetMonitor-iOSTests/NetworkMapViewModelTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/NetworkHealthScoreViewModelTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-iOSTests/NetworkEventServiceTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/MacConnectionServiceReceiveBufferTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/LiveActivityManagerTests.swift | Removes redundant @Suite names across multiple suites. |
| Tests/NetMonitor-iOSTests/GatewayServiceTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/DNSLookupToolViewModelTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-iOSTests/DeviceDetailViewModelTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/DataExportServiceTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/DataExportServiceExtendedTests.swift | Removes redundant @Suite name. |
| Tests/NetMonitor-iOSTests/DashboardViewModelTests.swift | Removes redundant @Suite name; keeps .serialized suite trait. |
| Tests/NetMonitor-iOSTests/BonjourDiscoveryToolViewModelTests.swift | Drops redundant @Suite string name; keeps .serialized. |
| Tests/NetMonitor-iOSTests/AppSettingsTests.swift | Removes redundant @Suite names. |
| Tests/NetMonitor-iOSTests/AppIntentsTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ThermalThrottleMonitorTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/SSDPScanPhaseTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ScanPipelineTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ScanPipelineRealIntegrationTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ScanPipelineIntegrationTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ScanEngineTests.swift | Removes redundant @Suite name; removes redundant Sendable on nested type. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ScanContextTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ScanAccumulatorTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/RTTTrackerTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ResumeStateTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/IPv4HelpersTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/DiscoveredDeviceTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ConnectionBudgetTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Tests/NetworkScanKitTests/ARPCacheScannerTests.swift | Removes redundant @Suite name. |
| Packages/NetworkScanKit/Sources/NetworkScanKit/Phases/TCPProbeScanPhase.swift | Removes redundant Sendable on private enums. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/WorldPingServiceErrorTests.swift | Drops @Suite string name; keeps .serialized. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/WorldPingRegressionTests.swift | Drops @Suite string names; keeps .serialized; removes one redundant no-trait suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/WorldPingModelsTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/WiFiMeasurementEngineTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/WHOISServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/WHOISServiceContractTests.swift | Removes redundant @Suite names (including integration suite name). |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/WakeOnLANServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/VPNDetectionServiceTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/TracerouteServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ToolModelsTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/SSLCertificateServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/SSLCertificateServiceIntegrationTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/SSLCertificateContractTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/SpeedTestServiceTests.swift | Removes redundant @Suite names. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/SpeedTestServiceIntegrationTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/SpeedTestServiceContractTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ServiceUtilitiesTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ServiceProtocolTypesTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ScanSchedulerServiceTests.swift | Drops @Suite string name; keeps .serialized. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ScanDiffTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ResumeStateTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/RemainingModelsTests.swift | Removes redundant @Suite names across multiple model test suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/RegressionTests.swift | Removes redundant @Suite names. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ProjectSaveLoadManagerTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/PortScannerServiceTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/PingServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/PingServiceIntegrationTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkUtilitiesTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkProfileManagerTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkProfileManagerExtendedTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkModelsTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkHealthScoreServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkEventServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkEventModelsTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/NetworkErrorTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/MACVendorLookupServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/MACVendorContractTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/LogSanitizerTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ICMPSocketTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/GeoLocationServiceTests.swift | Drops @Suite string name; keeps .serialized. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/GeoLocationContractTests.swift | Drops @Suite string name; keeps .serialized. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/FormattingExtensionsTests.swift | Removes redundant @Suite names. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/EnumsTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/DNSLookupServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/DNSLookupServiceIntegrationTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/ContractTests.swift | Drops @Suite string names (outer suite still .serialized); nested suites now rely on type names. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/CompanionMessageTests.swift | Removes redundant @Suite names across suites. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/CertificateExpirationTrackerTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Tests/NetMonitorCoreTests/BonjourDiscoveryServiceTests.swift | Removes redundant @Suite name. |
| Packages/NetMonitorCore/Sources/NetMonitorCore/Services/TracerouteService.swift | Removes redundant Sendable on private enum. |
| Packages/NetMonitorCore/Sources/NetMonitorCore/Services/ObservabilityService.swift | Removes redundant get {} from single-accessor computed property formatting. |
| Packages/NetMonitorCore/Sources/NetMonitorCore/Services/ICMPSocket.swift | Removes redundant Sendable conformances on internal types. |
| Packages/NetMonitorCore/Sources/NetMonitorCore/Services/DeviceDiscoveryService.swift | Removes redundant Sendable on private helper types. |
| NetMonitor-iOS/Platform/RateAppService.swift | Converts doc-comment TODO to regular TODO comment (SwiftFormat rule). |
| NetMonitor-iOS/Platform/GeoFenceManager.swift | Removes redundant Sendable conformances on internal models. |
| NetMonitor-iOS/Platform/DataExportService.swift | Removes redundant Sendable conformance on export format enum. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+10
to
12
| @Suite(.serialized) | ||
| @MainActor | ||
| struct UptimeViewModelTests { |
Comment on lines
+34
to
36
| @Suite(.serialized) | ||
| @MainActor | ||
| struct NDVGatewayLatencyFallbackTests { |
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
The SwiftFormat step in the Lint CI workflow was failing with 462 violations across 130 files, all auto-fixable. Ran
swiftformat .against the project's existing.swiftformatconfig to resolve.Changes
swiftTestingTestCaseNames(~121 files): Removed redundant string labels from@Suite("TypeName")when the name is derivable from the struct — e.g.@Suite("TracerouteToolViewModel", .serialized)→@Suite(.serialized)onstruct TracerouteToolViewModelTestsredundantSwiftTestingSuite(~105 files): Removed bare@Suiteattributes with no arguments or traits (no-op decorators)redundantSendable(7 files): Removed explicit: Sendablefrom enums/types where conformance is already impliedredundantGet(1 file): Removed explicitget {}block from single-accessor computed propertiesblankLinesBetweenScopes(1 file): Added missing blank line before a function declaration inside an actorsemicolons(1 file): Split semicolon-joined statements onto separate linestodos(1 file):/// TODO:(doc comment) →// TODO:(regular comment)No logic changes — purely formatting corrections enforced by the existing
.swiftformatconfig.Testing Done
xcodebuild test -scheme NetMonitor-macOSon mac-mini)xcodebuild test -scheme NetMonitor-iOSon mac-mini)swiftlint lint --quiet)swiftformat --lint .)Notes for Reviewer
No semantic changes. All 553 Swift files pass
swiftformat --lint .with 0 violations after this commit. The two new SwiftFormat rules (swiftTestingTestCaseNames,redundantSwiftTestingSuite) are default-enabled in SwiftFormat 0.59+ and were not previously disabled in.swiftformat.