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

Silence superfluous_else rule for availability conditions #5857

Merged
merged 1 commit into from
Nov 16, 2024

Conversation

SimplyDanny
Copy link
Collaborator

Fixes #5833.

@SwiftLintBot
Copy link

SwiftLintBot commented Nov 16, 2024

74 Messages
📖 Linting Aerial with this PR took 0.17s vs 0.17s on main (0% slower)
📖 Linting Alamofire with this PR took 0.17s vs 0.17s on main (0% slower)
📖 Linting Brave with this PR took 0.63s vs 0.63s on main (0% slower)
📖 Linting DuckDuckGo with this PR took 0.49s vs 0.49s on main (0% slower)
📖 Linting Firefox with this PR took 1.4s vs 1.43s on main (2% faster)
📖 Linting Kickstarter with this PR took 0.73s vs 0.73s on main (0% slower)
📖 Linting Moya with this PR took 0.13s vs 0.13s on main (0% slower)
📖 Linting NetNewsWire with this PR took 0.3s vs 0.3s on main (0% slower)
📖 Linting Nimble with this PR took 0.14s vs 0.14s on main (0% slower)
📖 Linting PocketCasts with this PR took 0.7s vs 0.68s on main (2% slower)
📖 Linting Quick with this PR took 0.12s vs 0.12s on main (0% slower)
📖 Linting Realm with this PR took 0.42s vs 0.42s on main (0% slower)
📖 Linting Sourcery with this PR took 0.28s vs 0.28s on main (0% slower)
📖 Linting Swift with this PR took 0.4s vs 0.4s on main (0% slower)
📖 Linting VLC with this PR took 0.19s vs 0.19s on main (0% slower)
📖 Linting Wire with this PR took 1.63s vs 1.66s on main (1% faster)
📖 Linting WordPress with this PR took 1.02s vs 1.03s on main (0% faster)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Aerial.swift:192:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Aerial.swift:88:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Hardware/DarkMode.swift:20:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Hardware/HardwareDetection.swift:158:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Hardware/HardwareDetection.swift:50:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Hardware/NightShift.swift:35:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsInfo.swift:391:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsUpdates.swift:39:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/Layers/CountdownLayer.swift:120:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/Layers/TimerLayer.swift:109:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Alamofire: /Source/Core/RequestTaskMap.swift:141:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Alamofire: /Source/Features/MultipartFormData.swift:555:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Alamofire: /Source/Features/ServerTrustEvaluation.swift:704:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Brave: /App/BraveWidgets/LockScreenFavoriteWidget.swift:22:7: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Brave: /App/BraveWidgets/LockScreenShortcutWidget.swift:22:7: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Brave: /App/BraveWidgets/TopNewsWidget.swift:19:7: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Brave: /Sources/BraveShields/WebcompatReporter.swift:124:7: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Brave: /Sources/BraveUI/SwiftUI/ListBackground.swift:16:7: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Brave: /Sources/BraveWallet/Extensions/BraveWalletExtensions.swift:514:7: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in DuckDuckGo: /Core/SchemeHandler.swift:83:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/AutofillViews.swift:220:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/OnboardingExperiment/Styles/OnboardingTextStyles.swift:38:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in DuckDuckGo: /DuckDuckGo/OnboardingExperiment/Styles/OnboardingTextStyles.swift:54:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in DuckDuckGo: /Widgets/Widgets.swift:245:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Firefox: /firefox-ios/Client/Frontend/Autofill/Address/AddressAutofillToggle.swift:96:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Firefox: /firefox-ios/WidgetKit/UIView+extension.swift:14:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Firefox: /firefox-ios/fastlane/SnapshotHelper.swift:209:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /Modules/Utils/Sources/PocketCastsUtils/Formatting/TimeFormatter.swift:80:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /WidgetExtension/App Icon/AppIconWidget.swift:13:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /WidgetExtension/Common/View+clearBackground.swift:7:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /WidgetExtension/Common/Widget+contentMarginsDisabled.swift:8:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /WidgetExtension/Now Playing/NowPlayingLockScreenWidget.swift:13:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /WidgetExtension/Up Next/UpNextLockScreenWidget.swift:13:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /fastlane/SnapshotHelper.swift:206:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in PocketCasts: /podcasts/End of Year/Views/View+Snapshot.swift:15:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Realm: /Realm/Tests/SwiftUITestHost/SwiftUITestHostApp.swift:533:19: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Realm: /Realm/Tests/SwiftUITestHost/SwiftUITestHostApp.swift:546:19: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Realm: /Realm/Tests/SwiftUITestHost/SwiftUITestHostApp.swift:553:19: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Realm: /Realm/Tests/SwiftUITestHostUITests/SwiftUITestHostUITests.swift:61:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Swift: /stdlib/public/Distributed/DistributedActor.swift:410:7: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringGutsRangeReplaceable.swift:399:9: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Buildsystem/Fastlane/SnapshotHelper.swift:206:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Sources/Media Library/MediaViewControllers/MediaViewController.swift:188:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Sources/Media Library/MediaViewControllers/MediaViewController.swift:463:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Sources/Playback/Player/MiniPlayer-iOS/AudioMiniPlayer.swift:77:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Sources/Playback/Player/VideoPlayer-iOS/Subviews/MediaNavigationBar.swift:132:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Sources/Playback/Player/VideoPlayer-iOS/VideoPlayerViewController.swift:533:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Sources/Settings/Model/ActionSheetSpecifier.swift:113:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in VLC: /Sources/UI Elements/PresentationTheme.swift:293:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Wire: /WireAPI/Sources/WireAPI/Network/PushChannel/WebSocket.swift:59:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in Wire: /wire-ios/Wire-iOS/Sources/UserInterface/Conversation/InputBar/EmojiRepository.swift:98:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in WordPress: /WordPress/Classes/Extensions/URL+Helpers.swift:11:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in WordPress: /WordPress/Classes/Extensions/URL+Helpers.swift:19:15: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in WordPress: /WordPress/Classes/ViewRelated/Reader/Sidebar/ReaderSidebarViewController.swift:142:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in WordPress: /WordPress/JetpackStatsWidgets/LockScreenWidgets/Configs/LockScreenStatsWidgetConfig.swift:20:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in WordPress: /WordPress/JetpackStatsWidgets/Views/Helpers/iOS17WidgetAPIs.swift:10:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)
📖 This PR fixed a violation in WordPress: /WordPress/JetpackStatsWidgets/Views/Helpers/iOS17WidgetAPIs.swift:20:11: warning: Superfluous Else Violation: Else branches should be avoided when the previous if-block exits the current scope (superfluous_else)

Generated by 🚫 Danger

@SimplyDanny SimplyDanny force-pushed the availability-condition branch from ebfd914 to 52e5abe Compare November 16, 2024 21:37
@SimplyDanny SimplyDanny enabled auto-merge (squash) November 16, 2024 21:37
@SimplyDanny SimplyDanny merged commit cafed07 into realm:main Nov 16, 2024
14 checks passed
@SimplyDanny SimplyDanny deleted the availability-condition branch November 17, 2024 15:26
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.

superfluous_else false positive when using if #available(…) else to avoid deprecation warning
2 participants