Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async_without_await rule #5869

Open
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

jkolarik-paylocity
Copy link

@jkolarik-paylocity jkolarik-paylocity commented Nov 25, 2024

Adds async_without_await #5082

@SwiftLintBot
Copy link

SwiftLintBot commented Nov 25, 2024

530 Warnings
⚠️ Big PR
⚠️ This PR introduced a violation in Alamofire: /Tests/ConcurrencyTests.swift:454:45: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Alamofire: /Tests/ConcurrencyTests.swift:480:45: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Alamofire: /Tests/ConcurrencyTests.swift:508:45: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /App/iOS/Delegates/AppDelegate.swift:306:96: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /App/l10n/tools/download-translations-from-transifex.swift:89:85: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Plugins/IntentBuilderPlugin/IntentBuilderPlugin.swift:11:68: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Plugins/LeoAssetsPlugin/LeoAssetsPlugin.swift:13:68: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Plugins/LoggerPlugin/LoggerPlugin.swift:11:68: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Browser/BrowserViewController/BVC+WKDownloadDelegate.swift:19:121: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Browser/BrowserViewController/BVC+WKDownloadDelegate.swift:27:139: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Browser/BrowserViewController/BVC+WKDownloadDelegate.swift:31:97: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Settings/Debug/BraveTalkLogsView.swift:53:26: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:130:16: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:148:16: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:178:16: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:191:16: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:214:16: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Settings/Features/ShieldsPrivacy/Clearables.swift:237:16: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveNews/Composer/FeedDataSource.swift:684:69: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveShared/BasicAuthCredentials.swift:31:5: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveUI/SwiftUI/WebImageReader.swift:39:41: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWallet/Crypto/Stores/SelectAccountTokenStore.swift:305:5: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWallet/Crypto/Stores/SignMessageRequestStore.swift:91:39: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWallet/Crypto/Stores/SwapTokenStore.swift:728:89: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWallet/Extensions/WebImageDownloaderExtensions.swift:19:52: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWallet/Preview Content/MockBraveWalletService.swift:134:48: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWallet/Preview Content/MockBraveWalletService.swift:141:33: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWallet/Preview Content/MockKeyringService.swift:305:73: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/BraveWidgetsModels/LockScreenFavoriteIntentHandler.swift:12:5: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/CertificateUtilities/BraveCertificateUtils.swift:233:71: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Growth/URP/UrpService.swift:198:92: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Sources/Onboarding/Welcome/WelcomeViewController.swift:451:129: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Tests/CertificateUtilitiesTests/CertificatePinningTest.swift:86:92: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Tests/ClientTests/DefaultBrowserHelperTests.swift:12:25: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Tests/ClientTests/TabManagerNavDelegateTests.swift:194:96: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in Brave: /Tests/ClientTests/TabManagerNavDelegateTests.swift:199:127: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /Core/BookmarksImporter.swift:90:43: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /Core/DataStoreWarmup.swift:49:101: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /Core/HistoryManager.swift:264:36: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /Core/HistoryManager.swift:274:49: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/AdAttribution/AdAttributionReporterStorage.swift:35:44: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/DuckPlayer/DuckPlayer.swift:299:57: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/DuckPlayer/DuckPlayer.swift:356:79: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/DuckPlayer/DuckPlayer.swift:371:75: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/DuckPlayer/DuckPlayer.swift:393:75: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/DuckPlayer/DuckPlayer.swift:437:66: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Favicons.swift:415:87: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/FavoritesPreviewDataSource.swift:74:61: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/FavoritesPreviewModel.swift:102:61: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/FavoritesPreviewModel.swift:80:61: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Feedback/VPNMetadataCollector.swift:157:38: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/MainViewController.swift:1890:39: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/Feedback/DefaultMetadataCollector.swift:28:28: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/IdentityTheftRestorationPagesFeature.swift:73:65: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:320:71: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:326:66: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:369:65: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:379:83: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:385:82: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:391:83: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:397:79: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:403:81: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/UserScripts/SubscriptionPagesUseSubscriptionFeature.swift:416:95: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/ViewModel/SubscriptionExternalLinkViewModel.swift:45:37: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/ViewModel/SubscriptionFlowViewModel.swift:211:42: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/ViewModel/SubscriptionFlowViewModel.swift:89:45: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/ViewModel/SubscriptionITPViewModel.swift:78:37: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/Subscription/ViewModel/SubscriptionRestoreViewModel.swift:88:45: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/SyncSettingsViewController.swift:307:29: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/VPNSnoozeLiveActivityManager.swift:38:54: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/AdAttributionPixelReporterTests.swift:250:44: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/AdAttributionPixelReporterTests.swift:261:18: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/AppSettingsMock.swift:78:30: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:114:77: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:123:74: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:142:64: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:165:61: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:211:64: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:222:51: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:235:61: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:247:63: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/BookmarksCachingSearchTests.swift:254:60: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/DuckPlayerMocks.swift:189:64: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/DuckPlayerMocks.swift:196:72: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/DuckPlayerMocks.swift:200:68: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/DuckPlayerMocks.swift:207:68: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/DuckPlayerMocks.swift:211:69: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/DuckPlayerMocks.swift:235:62: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/HistoryCaptureTests.swift:126:29: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/HistoryCaptureTests.swift:129:42: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:100:26: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:132:31: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:71:64: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:74:93: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:82:67: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:85:23: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:89:39: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:92:25: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockDDGSyncing.swift:96:43: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockFaviconStore.swift:28:80: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockPixelFiring.swift:59:67: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/MockPrivacyDataReporter.swift:80:28: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/NetworkProtectionVPNLocationViewModelTests.swift:664:30: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/NetworkProtectionVPNLocationViewModelTests.swift:681:43: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:106:74: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:121:74: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:136:76: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:151:84: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:165:113: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:177:100: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:47:79: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:55:77: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:63:77: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:82:57: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncErrorsAlertsTests.swift:96:66: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:102:79: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:116:77: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:125:81: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:139:98: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:153:77: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:162:78: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:176:77: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:185:78: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:46:75: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:55:79: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:70:77: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:79:81: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerSyncPausedAlertsTests.swift:93:75: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerTests.swift:101:86: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/SyncErrorHandlerTests.swift:111:90: warning: Async Without Await Violation: Declaration should not be async if it doesn't use await (async_without_await)
⚠️ Danger found 530 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 131.
17 Messages
📖 Linting Aerial with this PR took 0.92s vs 0.93s on main (1% faster)
📖 Linting Alamofire with this PR took 1.26s vs 1.26s on main (0% slower)
📖 Linting Brave with this PR took 7.18s vs 7.17s on main (0% slower)
📖 Linting DuckDuckGo with this PR took 5.17s vs 5.14s on main (0% slower)
📖 Linting Firefox with this PR took 10.71s vs 10.71s on main (0% slower)
📖 Linting Kickstarter with this PR took 10.0s vs 9.94s on main (0% slower)
📖 Linting Moya with this PR took 0.53s vs 0.53s on main (0% slower)
📖 Linting NetNewsWire with this PR took 2.92s vs 2.91s on main (0% slower)
📖 Linting Nimble with this PR took 0.77s vs 0.78s on main (1% faster)
📖 Linting PocketCasts with this PR took 8.6s vs 8.56s on main (0% slower)
📖 Linting Quick with this PR took 0.46s vs 0.46s on main (0% slower)
📖 Linting Realm with this PR took 4.48s vs 4.51s on main (0% faster)
📖 Linting Sourcery with this PR took 2.32s vs 2.31s on main (0% slower)
📖 Linting Swift with this PR took 4.51s vs 4.47s on main (0% slower)
📖 Linting VLC with this PR took 1.26s vs 1.25s on main (0% slower)
📖 Linting Wire with this PR took 17.83s vs 17.71s on main (0% slower)
📖 Linting WordPress with this PR took 11.38s vs 11.34s on main (0% slower)

Generated by 🚫 Danger

Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

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

Thank you for this first implementation!

Apart from my inline comments I have a few remarks:

  • The current implementation only covers functions. Think about adding support for other declarations supporting async.
  • Automatic fixes could be offered by this rule.
  • I presume the rule will currently fail to flag the async on f in the following example:
    func f() async {
      func g() async {}
      let x = { await g() }
    }
  • Perhaps async_without_await is sufficient as the rule's name. It sounds more like something to be aware of and not like a serious violation.

@jkolarik-paylocity jkolarik-paylocity changed the title Add no_async_without_await rule Add async_without_await rule Nov 26, 2024
@jkolarik-paylocity
Copy link
Author

jkolarik-paylocity commented Nov 26, 2024

Hi @SimplyDanny,

  • I have added support for:
    • init() async
    • get async
    • let x: () async -> Void = {}
  • Added SwiftSyntaxCorrectableRule.
  • Renamed no_async_without_await to async_without_await.

But it fails if a method is declared in a protocol. I will fix it. ✅

Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

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

Well done!

Again a few nits and some remarks:

  • Please check the findings in OSS repositories. This violation is a false positive for example.
  • The current implementation doesn't respect async let x = ... constructs.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link

@msrutek-paylocity msrutek-paylocity left a comment

Choose a reason for hiding this comment

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

👏

Copy link

@DominikBucher12 DominikBucher12 left a comment

Choose a reason for hiding this comment

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

🧡

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.

6 participants