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

Fix explicit_type_interface when used in statements #2244

Conversation

dirtydanee
Copy link
Contributor

Fix #2154

@dirtydanee dirtydanee changed the title Fix explicit_type_interface when used in statements or applying wea… Fix explicit_type_interface when used in statements Jun 15, 2018
@dirtydanee dirtydanee force-pushed the dm-bugfix-case-let-in-explicit_type_interface branch 3 times, most recently from 41a1d81 to 09abd6c Compare June 15, 2018 23:04
@SwiftLintBot
Copy link

SwiftLintBot commented Jun 15, 2018

9306 Messages
📖 Linting Aerial with this PR took 0.4s vs 0.52s on master (23% faster)
📖 Linting Alamofire with this PR took 3.68s vs 3.84s on master (4% faster)
📖 Linting Firefox with this PR took 14.3s vs 13.97s on master (2% slower)
📖 Linting Kickstarter with this PR took 22.16s vs 18.27s on master (21% slower)
📖 Linting Moya with this PR took 2.43s vs 1.92s on master (26% slower)
📖 Linting Nimble with this PR took 2.19s vs 1.81s on master (20% slower)
📖 Linting Quick with this PR took 0.65s vs 0.54s on master (20% slower)
📖 Linting Realm with this PR took 3.62s vs 3.44s on master (5% slower)
📖 Linting SourceKitten with this PR took 1.12s vs 1.15s on master (2% faster)
📖 Linting Sourcery with this PR took 5.31s vs 4.74s on master (12% slower)
📖 Linting Swift with this PR took 36.12s vs 29.42s on master (22% slower)
📖 Linting WordPress with this PR took 20.94s vs 18.53s on master (13% slower)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/App/AppDelegate.swift:20:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/App/AppDelegate.swift:21:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:28:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:63:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:43:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:62:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:78:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:110:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:150:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:161:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:176:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:185:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:198:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:220:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:240:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:249:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:270:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Extensions/CollectionType+Shuffling.swift:16:14: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Extensions/CollectionType+Shuffling.swift:16:31: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:59:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:99:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:170:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:174:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:179:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:184:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:217:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:222:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:71:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:91:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:117:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:142:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:154:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:160:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:188:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:208:27: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:219:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:228:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:241:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:246:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:289:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:294:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:30:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:186:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:190:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:233:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:404:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:489:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:33:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:64:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:77:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:88:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:108:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:157:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:173:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:186:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:195:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:226:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:75:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:83:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:92:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:145:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:216:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:226:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:244:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Example/Source/DetailViewController.swift:71:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Example/Source/DetailViewController.swift:84:22: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Example/Source/DetailViewController.swift:84:29: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/NetworkReachabilityManager.swift:74:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/NetworkReachabilityManager.swift:105:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/NetworkReachabilityManager.swift:120:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/NetworkReachabilityManager.swift:226:26: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/NetworkReachabilityManager.swift:226:57: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:45:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:62:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:107:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:107:31: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/Alamofire.swift:114:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:189:30: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:199:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:210:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:212:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:214:47: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:224:44: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:234:44: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:244:44: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:254:47: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:265:38: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:276:38: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:289:56: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:301:38: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:310:46: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:319:42: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:330:45: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:339:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:352:30: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:354:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:356:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:358:44: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:360:47: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:371:38: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:373:46: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:382:38: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:384:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:386:44: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:388:53: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:388:62: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:393:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:395:48: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:397:56: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:397:65: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:402:53: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:404:46: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:406:49: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:408:42: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:410:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:412:41: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:427:39: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:429:45: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:431:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:433:51: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:444:38: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:446:38: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:451:43: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:451:64: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/AFError.swift:456:42: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/MultipartFormData.swift:272:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/MultipartFormData.swift:288:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Alamofire: /Users/distiller/project/osscheck/Alamofire/Source/MultipartFormData.swift:358:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
⚠️ Danger found 9306 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 140.

Generated by 🚫 Danger

@codecov-io
Copy link

codecov-io commented Jun 15, 2018

Codecov Report

Merging #2244 into master will increase coverage by 0.07%.
The diff coverage is 98.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2244      +/-   ##
==========================================
+ Coverage   91.89%   91.96%   +0.07%     
==========================================
  Files         304      304              
  Lines       15254    15419     +165     
==========================================
+ Hits        14017    14180     +163     
- Misses       1237     1239       +2
Impacted Files Coverage Δ
...rk/Rules/Idiomatic/ExplicitTypeInterfaceRule.swift 97.5% <97.26%> (+1.07%) ⬆️
...rameworkTests/ExplicitTypeInterfaceRuleTests.swift 99.37% <99.11%> (-0.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c9b6b9...31ec32b. Read the comment docs.

@dirtydanee dirtydanee force-pushed the dm-bugfix-case-let-in-explicit_type_interface branch 2 times, most recently from f37a6cd to 0244e6b Compare June 16, 2018 11:37
}

var containsWeakSelf: Bool {
guard let name = name, name == "self" else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

you could replace this to guard name == "self" else

@@ -95,6 +95,10 @@

#### Bug Fixes

* Fix `explicit_type_interface` when used in statements.
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is in the wrong section, can you update this before merging?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

!containsType(dictionary: dictionary),
let offset = dictionary.offset else {
!dictionary.containsType,
!dictionary.containsWeakSelf,
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't we try to check if there's a capture group, no matter if it's weak or if it's capturing self?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that would make sense. Thanks for pointing it out!

This case is still failing:

 "class Foo {\n"                                         +
            "   func bar() {\n"                                     +
            "       var k = 0\n"                                    +
            "       _ = { [weak self, weak k] in\n"                 +
            "       guard let strongSelf = self else { return }\n"  +
            "       }\n"                                            +
            "   }\n"                                                +
            "}",

I am not sure how could I find the capture group, my first guess would be using a regex, something like this:
=\s+{\s*\[((\s)*\w+\s*\w+(,)*)+]\s+in

Do you have maybe an other idea how to approach finding the capture group?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a solution for searching capture groups with regex.

@dirtydanee dirtydanee force-pushed the dm-bugfix-case-let-in-explicit_type_interface branch 5 times, most recently from 57070ed to 068259f Compare July 11, 2018 18:54
verifyRule(description)
}

func testWeakSelf() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not just testing weak self anymore

let offset = dictionary.offset else {
!dictionary.containsType,
let offset = dictionary.offset,
!file.captureGroupByteRanges.contains(where: { $0.contains(offset) }),
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will perform the search for the whole file every time 😱

This is an opt-in rule, so having a worse performance is acceptable, but I'd be awesome if we could think of a way to make it faster.

Performing the regex match just on the parent type would be an option, but it'd have to change a few things. Other option would be performing the whole search first and the navigate the AST manually instead of using ASTRule.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I choose the later one, thanks for the suggestion. Here is a screenshot of the listing speed from before the change:

screen shot 2018-07-28 at 20 29 43

@dirtydanee
Copy link
Contributor Author

dirtydanee commented Aug 12, 2018

@marcelofabri I have pushed changes fixing the false negatives as you pointed out on #2321 and rebased to current master.

I see that os check is failing, with the second try on listing Swift. Could you give me some insights on how to fix this issue?

EDIT: I still see issues with declarations in switch, i will push a fix soon.

@dirtydanee dirtydanee force-pushed the dm-bugfix-case-let-in-explicit_type_interface branch 2 times, most recently from df340da to 15e8cab Compare August 13, 2018 22:20
@dirtydanee dirtydanee force-pushed the dm-bugfix-case-let-in-explicit_type_interface branch from 15e8cab to ccc8fab Compare August 14, 2018 09:11
@dirtydanee
Copy link
Contributor Author

dirtydanee commented Aug 14, 2018

In my last commit 31ec32b I added a Swift version runtime guard for the testSwitchCaseDeclarations test case to be higher than 4.1.

Given this simple example:

func foo() {
  switch foo {
  case var (x, y): let fooBar = 1
  }
}

The issue seems for the simple example below SourceKitten is not returning any varLocal SwiftDeclarationKind for fooBar in the file's structure running Swift 4.0. In fact, its not returning any declaration if it is inside a case statement.

I think the rule could be helpful for earlier Swift versions, so I would keep its minSwiftVersion on 3.0, but maybe we should document this limitation somehow?

@cmillani
Copy link

Is this PR still considered?
I have this rule enabled and some case .myError(let fooBar): that are triggering warnings, would love to have this fix :)

@jpsim
Copy link
Collaborator

jpsim commented Jan 23, 2019

@dirtydanee would you mind opening a new PR with this change? I'd be happy to start a review on it again, but I'd rather start fresh.

@dirtydanee
Copy link
Contributor Author

@jpsim I have reopened under the PR #2588

@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2019

Fantastic, thank you @dirtydanee. Let's close this and continue there.

@jpsim jpsim closed this Jan 24, 2019
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