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

Prefer if and switch expressions #5832

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

leonardosrodrigues0
Copy link
Contributor

WIP

Closes #5472

@SwiftLintBot
Copy link

4974 Warnings
⚠️ If this is a user-facing change, please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/CustomVideoController.swift:518:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/API/Forecast.swift:112:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/API/OneCall.swift:142:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/API/OpenWeather.swift:107:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Aerial.swift:166:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Aerial.swift:190:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Aerial.swift:201:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Aerial.swift:360:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Aerial.swift:73:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Aerial.swift:86:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:209:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:237:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:257:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:74:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Cache.swift:656:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:123:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:144:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:263:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:309:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Thumbnails.swift:154:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Thumbnails.swift:198:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Thumbnails.swift:209:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Thumbnails.swift:51:21: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/Thumbnails.swift:69:21: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/TimeMachine.swift:33:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoCache.swift:136:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoCache.swift:204:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoCache.swift:224:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoDownload.swift:161:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoManager.swift:64:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Extensions/AVAsset+VideoOrientation.swift:22:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/Battery.swift:20:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DarkMode.swift:15:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/HardwareDetection.swift:134:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/HardwareDetection.swift:149:17: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/HardwareDetection.swift:48:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/HardwareDetection.swift:63:17: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/HardwareDetection.swift:71:17: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:509:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/PlaybackSpeed.swift:13:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsInfo.swift:389:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsInfo.swift:399:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsUpdates.swift:37:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsVideos.swift:213:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Sidebar.swift:59:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:136:17: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:293:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:308:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:316:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:70:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceList.swift:446:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/VideoList.swift:124:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/VideoList.swift:252:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/VideoList.swift:390:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/VideoList.swift:525:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/VideoList.swift:57:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/VideoList.swift:79:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/Solar.swift:180:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/TimeManagement.swift:147:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/TimeManagement.swift:212:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/TimeManagement.swift:259:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/TimeManagement.swift:272:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:361:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:56:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:69:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:83:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimatableLayer.swift:159:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationTextLayer.swift:125:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationTextLayer.swift:169:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationTextLayer.swift:89:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/DateLayer.swift:71:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/DateLayer.swift:82:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/LayerManager.swift:63:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/LocationLayer.swift:105:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/MessageLayer.swift:92:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ConditionLayer.swift:46:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ConditionSymbolLayer.swift:275:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ConditionSymbolLayer.swift:286:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ConditionSymbolLayer.swift:294:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ForecastLayer.swift:44:25: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/Weather/ForecastLayer.swift:527:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoCommonView.swift:108:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoCommonView.swift:165:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/PanelWindowController.swift:95:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/FiltersViewController.swift:66:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/NowPlayingViewController.swift:72:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/SourcesViewController.swift:194:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/SourcesViewController.swift:207:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/SourcesViewController.swift:335:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/SidebarViewController.swift:158:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/SidebarViewController.swift:236:13: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/VideosViewController.swift:227:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/VideosViewController.swift:257:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/VideosViewController.swift:436:21: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/VideosViewController.swift:564:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift:190:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/AFError.swift:385:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/AFError.swift:666:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/SessionDelegate.swift:93:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/UploadRequest.swift:112:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/WebSocketRequest.swift:551:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Extensions/Result+Alamofire.swift:62:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Features/ServerTrustEvaluation.swift:702:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Source/Features/URLEncodedFormEncoder.swift:599:17: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Tests/CombineTests.swift:1200:21: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Tests/CombineTests.swift:231:21: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Tests/CombineTests.swift:735:21: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionTests.swift:180:21: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/BraveWidgets/LockScreenFavoriteWidget.swift:15:5: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/BraveWidgets/LockScreenShortcutWidget.swift:15:5: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/BraveWidgets/TopNewsWidget.swift:17:5: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/BraveWidgets/TopNewsWidget.swift:52:5: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/iOS/Delegates/AppDelegate.swift:283:5: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/iOS/Delegates/AppState.swift:146:9: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/iOS/Delegates/SceneDelegate.swift:473:7: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /App/iOS/Delegates/SceneDelegate.swift:587:5: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/BraveSkus/BraveSkusWebHelper.swift:96:5: warning: Prefer if and switch expressions Violation: Use if and switch expressions instead of statements that perform similar actions in its branches (prefer_if_and_switch_expressions)
⚠️ Danger found 4974 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 118.
17 Messages
📖 Linting Aerial with this PR took 0.96s vs 0.93s on main (3% slower)
📖 Linting Alamofire with this PR took 1.27s vs 1.27s on main (0% slower)
📖 Linting Brave with this PR took 7.27s vs 7.22s on main (0% slower)
📖 Linting DuckDuckGo with this PR took 5.07s vs 5.07s on main (0% slower)
📖 Linting Firefox with this PR took 10.55s vs 10.61s on main (0% faster)
📖 Linting Kickstarter with this PR took 9.78s vs 9.84s on main (0% faster)
📖 Linting Moya with this PR took 0.52s vs 0.54s on main (3% faster)
📖 Linting NetNewsWire with this PR took 2.62s vs 2.63s on main (0% faster)
📖 Linting Nimble with this PR took 0.77s vs 0.77s on main (0% slower)
📖 Linting PocketCasts with this PR took 8.43s vs 8.45s on main (0% faster)
📖 Linting Quick with this PR took 0.44s vs 0.46s on main (4% faster)
📖 Linting Realm with this PR took 4.65s vs 4.53s on main (2% slower)
📖 Linting Sourcery with this PR took 2.38s vs 2.3s on main (3% slower)
📖 Linting Swift with this PR took 4.54s vs 4.5s on main (0% slower)
📖 Linting VLC with this PR took 1.25s vs 1.25s on main (0% slower)
📖 Linting Wire with this PR took 17.73s vs 17.69s on main (0% slower)
📖 Linting WordPress with this PR took 11.57s vs 11.5s on main (0% slower)

Here's an example of your CHANGELOG entry:

* Prefer `if` and `switch` expressions.  
  [leonardosrodrigues0](https://github.com/leonardosrodrigues0)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

Generated by 🚫 Danger

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.

Rule Request: Prefer if and switch expressions
2 participants