Skip to content

Add auto-correction, and multi-violation support to multiline_call_arguments - #6745

Merged
SimplyDanny merged 4 commits into
realm:mainfrom
GandaLF2006:gandalf2006/multiline_call_arguments/correctable
Aug 30, 2026
Merged

Add auto-correction, and multi-violation support to multiline_call_arguments#6745
SimplyDanny merged 4 commits into
realm:mainfrom
GandaLF2006:gandalf2006/multiline_call_arguments/correctable

Conversation

@GandaLF2006

@GandaLF2006 GandaLF2006 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Enhances the multiline_call_arguments opt-in rule with auto-correction and multi-violation detection in a single pass.

Auto-correction (--fix)

  • Single-line calls are reformatted to place each argument on its own line with proper indentation (using the global indentation setting from .swiftlint.yml); the closing ) moves to its own line at the call's base indent
  • Multi-line calls with duplicate-start-line or missing-newline-after-comma violations are corrected by inserting \n + indent in the appropriate range
  • Calls with comments in argument tokens are not auto-corrected (manual fix required); string literals containing comment-like text are correctly identified as non-comments
  • Nested single-line calls that would produce overlapping corrections: only the outer call's correction is applied; the inner call is corrected on a subsequent --fix pass

Multi-violation support

  • Previously, duplicateArgumentStartLineViolation and newlineAfterCommaViolation returned at the first match, requiring repeated --fix passes for calls with multiple same-line argument pairs
  • Now collects all violations in a single pass (reasonedViolations returns [ReasonedRuleViolation])

Documentation

  • Split RuleDescription.description into concise description (what) + structured rationale (why/how) with markdown sections

@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 2 times, most recently from b183a6a to 78a2da1 Compare June 1, 2026 09:19
@GandaLF2006

GandaLF2006 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@SimplyDanny Let's add correctable for multiline_call_arguments :)

The CI failure on oss_scan is not related to this PR — it's a danger bot failing to post a comment due to the repository's interaction limits (422 - Interactions on this repository have been restricted to prior contributors only)

@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch from f16bd4c to 8b5b043 Compare June 6, 2026 18:56
@SwiftLintBot

SwiftLintBot commented Jun 6, 2026

Copy link
Copy Markdown
4395 Warnings
⚠️ Big PR
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/ClockLayer.swift:80:27: Warning: In multi-line calls, a newline is required after each comma (multiline_call_arguments)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ForecastLayer.swift:65:53: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ForecastLayer.swift:66:87: Warning: In multi-line calls, a newline is required after each comma (multiline_call_arguments)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ForecastLayer.swift:93:53: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ForecastLayer.swift:94:70: Warning: In multi-line calls, a newline is required after each comma (multiline_call_arguments)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:639:58: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Preferences/StartupPreferencesTests.swift:117:12: Warning: In multi-line calls, a newline is required after each comma (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Preferences/StartupPreferencesTests.swift:125:12: Warning: In multi-line calls, a newline is required after each comma (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Preferences/StartupPreferencesTests.swift:133:12: Warning: In multi-line calls, a newline is required after each comma (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DuckSchemeHandler/DuckSchemeHandlerTests.swift:205:31: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DuckSchemeHandler/DuckSchemeHandlerTests.swift:205:51: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DuckSchemeHandler/DuckSchemeHandlerTests.swift:205:67: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DuckSchemeHandler/DuckSchemeHandlerTests.swift:206:41: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DuckSchemeHandler/DuckSchemeHandlerTests.swift:206:57: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/RemoteMessaging/ActiveRemoteMessageModelTests.swift:37:93: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/RemoteMessaging/ActiveRemoteMessageModelTests.swift:37:113: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/FileDownload/DownloadsTabExtensionTests.swift:61:83: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/FileDownload/DownloadsTabExtensionTests.swift:96:83: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/FileDownload/DownloadsTabExtensionTests.swift:126:83: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Feedback/QuickFeedback/QuickFeedbackTipControllerTests.swift:100:56: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Feedback/QuickFeedback/QuickFeedbackTipControllerTests.swift:170:56: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/PromptBar/PromptBarOmnibarContentLayoutTests.swift:55:58: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/PromptBar/PromptBarOmnibarContentLayoutTests.swift:64:58: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/PromptBar/PromptBarOmnibarContentLayoutTests.swift:117:54: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/PromptBar/PromptBarOmnibarContentLayoutTests.swift:143:52: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/PromptBar/PromptBarOmnibarContentLayoutTests.swift:162:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/QuitSurvey/QuitSurveyViewModelTests.swift:355:89: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/QuitSurvey/QuitSurveyViewModelTests.swift:425:89: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/AIChat/DuckAIPromptPixelFiringTests.swift:56:98: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/AIChat/AIChatOmnibarDuckAILogoLayoutTests.swift:55:66: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/AIChat/AIChatOmnibarDuckAILogoLayoutTests.swift:92:47: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DataImport/LegacyDataImportViewModelTests.swift:535:82: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DataImport/LegacyDataImportViewModelTests.swift:1729:81: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DataImport/LegacyDataImportViewModelTests.swift:1729:99: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DataImport/LegacyDataImportViewModelTests.swift:1735:75: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/DataImport/LegacyDataImportViewModelTests.swift:1735:155: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Common/FileSystem/EncryptedValueTransformerTests.swift:57:74: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Common/FileSystem/EncryptedValueTransformerTests.swift:58:54: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Common/FileSystem/EncryptedValueTransformerTests.swift:58:74: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Common/FileSystem/EncryptedValueTransformerTests.swift:58:90: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Common/FileSystem/EncryptedValueTransformerTests.swift:59:64: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Common/FileSystem/EncryptedValueTransformerTests.swift:59:80: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/AIChat/AIChatOmnibarControllerTests.swift:475:71: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/AIChat/AIChatOmnibarControllerTests.swift:476:51: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/AIChat/AIChatOmnibarControllerTests.swift:476:74: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/AIChat/AIChatOmnibarControllerTests.swift:477:51: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:462:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:466:104: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:469:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:473:104: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:476:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:479:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:483:104: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:486:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:490:104: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:493:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:1046:104: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:1048:104: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:1050:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:1053:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:1056:104: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/Bookmarks/Services/LocalBookmarkStoreTests.swift:1058:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/NewTabPage/NewTabPageOmnibarModelsProviderTests.swift:64:69: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/NewTabPage/NewTabPageOmnibarModelsProviderTests.swift:65:56: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/NewTabPage/NewTabPageOmnibarModelsProviderTests.swift:65:101: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /macOS/UnitTests/NetworkProtection/WinBackOfferPromptPresenterTests.swift:41:58: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:214:63: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:214:79: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:346:63: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:346:79: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:349:63: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:349:79: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:389:59: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Tests/DataBrokerProtectionCoreTests/EmailConfirmationDataServiceTests.swift:389:75: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UnifiedToggleInput/UnifiedToggleInputDisplayState.swift:67:62: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UnifiedToggleInput/UnifiedToggleInputDisplayState.swift:67:80: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/AppLifecycle/AppStates/Launching.swift:559:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UnifiedToggleInput/MainViewController+UnifiedToggleInput.swift:1515:53: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UnifiedToggleInput/MainViewController+UnifiedToggleInput.swift:1515:79: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UIHostingControllerExtension.swift:48:120: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/AlertPlaygroundView.swift:119:69: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+MultiSelect.swift:285:66: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+MultiSelect.swift:288:68: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/PrivacyIconView.swift:222:74: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/PrivacyIconView.swift:222:109: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/PrivacyIconView.swift:235:74: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/PrivacyIconView.swift:235:109: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:26:77: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:27:45: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:29:77: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:30:53: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:34:72: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:35:55: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:36:72: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:37:55: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:43:80: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:44:65: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:49:79: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:50:45: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:52:81: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:53:45: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:54:83: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:55:45: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:57:81: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:58:45: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:59:83: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:60:45: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:62:75: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabSwitcherViewController+KeyCommands.swift:63:45: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/BrowserToolbarView.swift:648:82: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/BrowserToolbarView.swift:648:110: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/BrowserToolbarView.swift:693:82: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/BrowserToolbarView.swift:693:111: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/BrowserToolbarView.swift:693:139: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/BrowserToolbarView.swift:693:167: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UIViewExtension.swift:32:52: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UIViewExtension.swift:33:33: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UIViewExtension.swift:33:48: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UIViewExtension.swift:39:51: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UIViewExtension.swift:40:32: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/UIViewExtension.swift:40:47: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/DebugScreensViewController.swift:163:51: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/DebugScreensViewController.swift:179:88: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/BookmarksDebugViewController.swift:44:140: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabViewController.swift:1391:40: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabViewController.swift:3955:85: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ This PR introduced a violation in DuckDuckGo: /iOS/DuckDuckGo/TabViewController.swift:3988:89: Warning: In multi-line calls, each argument must start on its own line (multiline_call_arguments)
⚠️ Danger found 4395 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 128.
20 Messages
📖 Building this branch resulted in a binary size of 28467.8 KiB vs 28415.46 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.68 s vs 0.68 s on main (0% slower).
📖 Linting Alamofire with this PR took 0.97 s vs 0.96 s on main (1% slower).
📖 Linting Brave with this PR took 6.3 s vs 6.3 s on main (0% slower).
📖 Linting Brigade with this PR took 18.23 s vs 18.16 s on main (0% slower).
📖 Linting DuckDuckGo with this PR took 29.61 s vs 29.67 s on main (0% faster).
📖 Linting Firefox with this PR took 11.4 s vs 11.39 s on main (0% slower).
📖 Linting Kickstarter with this PR took 7.36 s vs 7.34 s on main (0% slower).
📖 Linting Moya with this PR took 0.38 s vs 0.38 s on main (0% slower).
📖 Linting NetNewsWire with this PR took 2.52 s vs 2.52 s on main (0% slower).
📖 Linting Nimble with this PR took 0.56 s vs 0.56 s on main (0% slower).
📖 Linting PocketCasts with this PR took 7.39 s vs 7.4 s on main (0% faster).
📖 Linting Quick with this PR took 0.37 s vs 0.37 s on main (0% slower).
📖 Linting Realm with this PR took 2.96 s vs 2.98 s on main (0% faster).
📖 Linting Sourcery with this PR took 1.66 s vs 1.64 s on main (1% slower).
📖 Linting Swift with this PR took 4.52 s vs 4.53 s on main (0% faster).
📖 Linting SwiftLintPerformanceTests with this PR took 0.18 s vs 0.19 s on main (5% faster).
📖 Linting VLC with this PR took 1.31 s vs 1.31 s on main (0% slower).
📖 Linting Wire with this PR took 16.3 s vs 16.3 s on main (0% slower).
📖 Linting WordPress with this PR took 10.47 s vs 10.47 s on main (0% slower).

Generated by 🚫 Danger

@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch from 3c09c9b to c2b5aa8 Compare June 6, 2026 22:32
@GandaLF2006
GandaLF2006 requested a review from SimplyDanny June 7, 2026 15:38
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 2 times, most recently from 9510ef7 to 0cdc2a7 Compare June 15, 2026 07:10
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 4 times, most recently from 7b65161 to 9a91acd Compare June 24, 2026 11:28
@GandaLF2006

Copy link
Copy Markdown
Contributor Author

@SimplyDanny It would be great if you could review the PR :)

@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch from 9a91acd to 0bd454f Compare June 24, 2026 11:54

@SimplyDanny SimplyDanny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some findings. Please consider them and rebase your branch updating your tests to Swift Testing.

Pleas also check why there are so many OSS findings.

Comment thread Source/SwiftLintFramework/Configuration/Configuration+IndentationStyle.swift Outdated
Comment thread Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRule.swift Outdated
Comment thread Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRule.swift Outdated
Comment thread Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRuleExamples.swift Outdated
Comment thread Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRuleExamples.swift Outdated
Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift Outdated
Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift Outdated
Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift Outdated
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 3 times, most recently from ebc98ef to f694a41 Compare June 27, 2026 22:20
@GandaLF2006
GandaLF2006 requested a review from SimplyDanny June 27, 2026 22:43
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch from 8b03add to 1d6eaeb Compare June 28, 2026 19:47

@SimplyDanny SimplyDanny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more comments ...

In general, I'm not against using AI to help with coding. However, I expect from contributors that they understand what they are proposing, review the code and clean things up themselves.

I see a lot of redundancy and useless information in comments as well as unused code that I shouldn't not need to take care of as a reviewer. There are many other PRs waiting for my feedback. So please make sure to propose only changes that you have thoroughly reviewed and improved yourself. Otherwise, I might lose my motivation to review anything like this. AI only has a chance to be of help if it makes use faster as a whole. Shifting work from you to someone else doesn't increase throughput at all.

Comment thread CHANGELOG.md Outdated
Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift Outdated
Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift
Comment thread Source/SwiftLintFramework/Models/Linter.swift Outdated
Comment thread Source/SwiftLintCore/Models/IndentationStyle.swift Outdated
Comment thread Source/SwiftLintCore/Models/CurrentRule.swift Outdated
Comment thread Source/SwiftLintCore/Models/CurrentRule.swift Outdated
@GandaLF2006

Copy link
Copy Markdown
Contributor Author

A few more comments ...

In general, I'm not against using AI to help with coding. However, I expect from contributors that they understand what they are proposing, review the code and clean things up themselves.

I see a lot of redundancy and useless information in comments as well as unused code that I shouldn't not need to take care of as a reviewer. There are many other PRs waiting for my feedback. So please make sure to propose only changes that you have thoroughly reviewed and improved yourself. Otherwise, I might lose my motivation to review anything like this. AI only has a chance to be of help if it makes use faster as a whole. Shifting work from you to someone else doesn't increase throughput at all.

I completely agree with you about speeding up work with AI without shifting.
It was easier for me to write documentation for the code because I felt the context could be conveyed better. I'll review the documentation again, thanks for the tip.
Whenever I make a change, I check the code in a project with 2,000+ Swift files, using a sampling of 200+ examples.

@GandaLF2006
GandaLF2006 marked this pull request as draft July 1, 2026 07:54
@SimplyDanny

Copy link
Copy Markdown
Collaborator

A few more comments ...

In general, I'm not against using AI to help with coding. However, I expect from contributors that they understand what they are proposing, review the code and clean things up themselves.

I see a lot of redundancy and useless information in comments as well as unused code that I shouldn't not need to take care of as a reviewer. There are many other PRs waiting for my feedback. So please make sure to propose only changes that you have thoroughly reviewed and improved yourself. Otherwise, I might lose my motivation to review anything like this. AI only has a chance to be of help if it makes use faster as a whole. Shifting work from you to someone else doesn't increase throughput at all.

I completely agree with you about speeding up work with AI without shifting.

It was easier for me to write documentation for the code because I felt the context could be conveyed better. I'll review the documentation again, thanks for the tip.

Whenever I make a change, I check the code in a project with 2,000+ Swift files, using a sampling of 200+ examples.

I appreciate you running such extensive tests. The implementation and coverage look decent indeed. However, "it works" is not all I have an eye on. Project fit, simplicity and avoidance of redundancy are of similar importance. There is also nothing against letting AI document things. But sometimes no comment is just the right amount, especially in obvious cases. 😉

Thank you for relentlessly fixing all my (nitpicky) comments and the ongoing contributions!

@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 3 times, most recently from 8b52ebd to 85e828d Compare July 14, 2026 20:49
@GandaLF2006
GandaLF2006 requested a review from SimplyDanny July 14, 2026 20:49
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 2 times, most recently from fa9b77a to e58072b Compare August 1, 2026 14:04
@GandaLF2006

Copy link
Copy Markdown
Contributor Author

@SimplyDanny It would be great if you could review it again :)

@GandaLF2006 GandaLF2006 changed the title Add auto-correction, indentation config, and multi-violation support to multiline_call_arguments Add auto-correction, and multi-violation support to multiline_call_arguments Aug 1, 2026
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 2 times, most recently from 462ed9f to 53f3cf7 Compare August 12, 2026 10:29
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 2 times, most recently from c765971 to 152c5bb Compare August 27, 2026 21:43
…to multiline_call_arguments

# Conflicts:
#	Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRuleExamples.swift
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 2 times, most recently from ed3ce73 to 5af9811 Compare August 28, 2026 21:50
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch from 5af9811 to 3cd04ac Compare August 28, 2026 22:23
Comment thread Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRule.swift Outdated
Comment thread Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRule.swift Outdated
Comment thread Source/SwiftLintBuiltInRules/Rules/Lint/MultilineCallArgumentsRuleExamples.swift Outdated
Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift Outdated
Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift Outdated
let file = SwiftLintFile(contents: contents)
// Correct to convergence: no pass may drop an argument.
var remaining = 5
while remaining > 0, rule.correct(file: file) > 0 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean, not all corrections are performed at once? In other words, would user need to run swiftlint lint --fix multiple times to get all violations corrected?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All corrections with non-overlapping ranges are applied in a single pass. The loop was a leftover from before multi-violation support. Simplified the test. Multiple passes remain necessary only for nested single-line calls with overlapping ranges.

Comment thread Tests/BuiltInRulesTests/MultilineCallArgumentsRuleTests.swift Outdated
Comment thread CHANGELOG.md Outdated
Comment thread Tests/FrameworkTests/GlobalConfigurationTests.swift
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 5 times, most recently from e44bc71 to 1b61aa7 Compare August 30, 2026 10:17
Comment thread CHANGELOG.md Outdated
Comment thread Source/SwiftLintBase/String+SwiftLint.swift
Comment thread Source/SwiftLintBase/String+SwiftLint.swift
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch 2 times, most recently from 4233904 to 6a831e0 Compare August 30, 2026 11:04
@GandaLF2006
GandaLF2006 force-pushed the gandalf2006/multiline_call_arguments/correctable branch from 6a831e0 to ffef965 Compare August 30, 2026 11:33
@SimplyDanny

Copy link
Copy Markdown
Collaborator

Thanks for all the work, @GandaLF2006! Did you check if the reported OSS findings are valid?

@GandaLF2006

Copy link
Copy Markdown
Contributor Author

@SimplyDanny I checked about 60 of the reported OSS findings and they were all valid.

@SimplyDanny
SimplyDanny merged commit 196dedd into realm:main Aug 30, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants